diff options
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); } |