SF: Change screenshot code to use snapshots

This prepares us for frontend changes which do not rely on the Layer
object. Instead we change the traversal function to return
a z-ordered list of snapshots. This cl also changes some of the logic
to check the snapshot instead of the layer drawing state.

Bug: 238781169
Test: presubmit
Test: manually test hdr listeners

Change-Id: If508f9380fdef0414bbf448ece767be3e0bba9cf
6 files changed