summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/RegionSamplingThread.cpp
diff options
context:
space:
mode:
author Vishnu Nair <vishnun@google.com> 2023-01-24 03:59:27 +0000
committer Vishnu Nair <vishnun@google.com> 2023-01-26 18:32:31 +0000
commit7aa0eb74f5d3ae176cc4b3d51ce69512aae6926f (patch)
treeefd797d21de2e6d122d22f24bed74cf44793829a /services/surfaceflinger/RegionSamplingThread.cpp
parent2e6e00db9f18766f9065559139af988ee27dd642 (diff)
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
Diffstat (limited to 'services/surfaceflinger/RegionSamplingThread.cpp')
-rw-r--r--services/surfaceflinger/RegionSamplingThread.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/surfaceflinger/RegionSamplingThread.cpp b/services/surfaceflinger/RegionSamplingThread.cpp
index 6e64e0a13b..839500f8a0 100644
--- a/services/surfaceflinger/RegionSamplingThread.cpp
+++ b/services/surfaceflinger/RegionSamplingThread.cpp
@@ -344,12 +344,13 @@ void RegionSamplingThread::captureSample() {
renderengine::impl::ExternalTexture::Usage::
WRITEABLE);
}
+ auto getLayerSnapshots = RenderArea::fromTraverseLayersLambda(traverseLayers);
constexpr bool kRegionSampling = true;
constexpr bool kGrayscale = false;
if (const auto fenceResult =
- mFlinger.captureScreenCommon(std::move(renderAreaFuture), traverseLayers, buffer,
+ mFlinger.captureScreenCommon(std::move(renderAreaFuture), getLayerSnapshots, buffer,
kRegionSampling, kGrayscale, nullptr)
.get();
fenceResult.ok()) {