diff options
author | 2024-06-26 17:17:51 -0700 | |
---|---|---|
committer | 2024-06-26 17:50:18 -0700 | |
commit | 871886eebe469fc21568ff363993bde9a6593837 (patch) | |
tree | 378fc126d6358e888ad6db2a96d8ed11f9a7fc6e /services/surfaceflinger/RegionSamplingThread.cpp | |
parent | 5832cfde21db2e6720422b60e3ef98c526472058 (diff) |
Fix region sampling for secure layers
We were swapping a couple of boolean params when requesting
screenshots for region sampling, breaking region sampling for
secure layers in the process. Fix this by passing flags instead of
booleans in a long list of arguments and add a test to verify the
code path.
FLAG: EXEMPT bugfix
Fixes: 348944802
Test: presubmit
Change-Id: I58f12e5cf81cb59115c1b9c500ac1e18a8ec72e5
Diffstat (limited to 'services/surfaceflinger/RegionSamplingThread.cpp')
-rw-r--r-- | services/surfaceflinger/RegionSamplingThread.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/services/surfaceflinger/RegionSamplingThread.cpp b/services/surfaceflinger/RegionSamplingThread.cpp index 5add290e96..e579eb08a6 100644 --- a/services/surfaceflinger/RegionSamplingThread.cpp +++ b/services/surfaceflinger/RegionSamplingThread.cpp @@ -277,7 +277,6 @@ void RegionSamplingThread::captureSample() { } const Rect sampledBounds = sampleRegion.bounds(); - constexpr bool kHintForSeamlessTransition = false; std::unordered_set<sp<IRegionSamplingListener>, SpHash<IRegionSamplingListener>> listeners; @@ -350,9 +349,8 @@ void RegionSamplingThread::captureSample() { SurfaceFlinger::RenderAreaBuilderVariant renderAreaBuilder(std::in_place_type<DisplayRenderAreaBuilder>, sampledBounds, - sampledBounds.getSize(), ui::Dataspace::V0_SRGB, - kHintForSeamlessTransition, true /* captureSecureLayers */, - displayWeak); + sampledBounds.getSize(), ui::Dataspace::V0_SRGB, displayWeak, + RenderArea::Options::CAPTURE_SECURE_LAYERS); FenceResult fenceResult; if (FlagManager::getInstance().single_hop_screenshot() && |