diff options
| author | 2024-06-27 14:39:57 +0000 | |
|---|---|---|
| committer | 2024-06-27 14:39:57 +0000 | |
| commit | 49943cf4e407deed8e2d7645397bd035232f314c (patch) | |
| tree | 73513bca02b057389c6c107db095cd1a938693ce /services/surfaceflinger/SurfaceFlinger.cpp | |
| parent | 1693ba47112a54712caeba4cb7b75ffb832499c8 (diff) | |
| parent | 871886eebe469fc21568ff363993bde9a6593837 (diff) | |
Merge "Fix region sampling for secure layers" into main
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index fd4bd1176e..e65efc53f0 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -7958,10 +7958,13 @@ void SurfaceFlinger::captureDisplay(const DisplayCaptureArgs& args, GetLayerSnapshotsFunction getLayerSnapshotsFn = getLayerSnapshotsForScreenshots(layerStack, args.uid, std::move(excludeLayerIds)); + ftl::Flags<RenderArea::Options> options; + if (args.captureSecureLayers) options |= RenderArea::Options::CAPTURE_SECURE_LAYERS; + if (args.hintForSeamlessTransition) + options |= RenderArea::Options::HINT_FOR_SEAMLESS_TRANSITION; captureScreenCommon(RenderAreaBuilderVariant(std::in_place_type<DisplayRenderAreaBuilder>, args.sourceCrop, reqSize, args.dataspace, - args.hintForSeamlessTransition, - args.captureSecureLayers, displayWeak), + displayWeak, options), getLayerSnapshotsFn, reqSize, args.pixelFormat, args.allowProtected, args.grayscale, captureListener); } @@ -8012,10 +8015,12 @@ void SurfaceFlinger::captureDisplay(DisplayId displayId, const CaptureArgs& args constexpr bool kAllowProtected = false; constexpr bool kGrayscale = false; + ftl::Flags<RenderArea::Options> options; + if (args.hintForSeamlessTransition) + options |= RenderArea::Options::HINT_FOR_SEAMLESS_TRANSITION; captureScreenCommon(RenderAreaBuilderVariant(std::in_place_type<DisplayRenderAreaBuilder>, - Rect(), size, args.dataspace, - args.hintForSeamlessTransition, - false /* captureSecureLayers */, displayWeak), + Rect(), size, args.dataspace, displayWeak, + options), getLayerSnapshotsFn, size, args.pixelFormat, kAllowProtected, kGrayscale, captureListener); } @@ -8114,10 +8119,13 @@ void SurfaceFlinger::captureLayers(const LayerCaptureArgs& args, return; } + ftl::Flags<RenderArea::Options> options; + if (args.captureSecureLayers) options |= RenderArea::Options::CAPTURE_SECURE_LAYERS; + if (args.hintForSeamlessTransition) + options |= RenderArea::Options::HINT_FOR_SEAMLESS_TRANSITION; captureScreenCommon(RenderAreaBuilderVariant(std::in_place_type<LayerRenderAreaBuilder>, crop, - reqSize, dataspace, args.captureSecureLayers, - args.hintForSeamlessTransition, parent, - args.childrenOnly), + reqSize, dataspace, parent, args.childrenOnly, + options), getLayerSnapshotsFn, reqSize, args.pixelFormat, args.allowProtected, args.grayscale, captureListener); } |