From 18fa7c60ccd9697973308fce60482e67dee58d98 Mon Sep 17 00:00:00 2001 From: Chavi Weingarten Date: Tue, 28 Nov 2023 21:16:03 +0000 Subject: Add isProtected flag to Output Allow outputs to decide if they want to render protected content, not just if they support it. The current code checks if the Output is secure when deciding whether to render protected content. By adding a new flag, it will allow displays to decide if they want to render secure, protected, or both. This code doesn't have a way to create displays with only protected and will still rely on the isSecure flag to ensure backwards compatibility. Test: presubmit Fixes: 285553970 Fixes: 300492271 Change-Id: If5e65388825d37f4ddaea5190259a136cfa89264 --- services/surfaceflinger/ScreenCaptureOutput.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'services/surfaceflinger/ScreenCaptureOutput.cpp') diff --git a/services/surfaceflinger/ScreenCaptureOutput.cpp b/services/surfaceflinger/ScreenCaptureOutput.cpp index 57b0d5e0ea..a4a5ce2b46 100644 --- a/services/surfaceflinger/ScreenCaptureOutput.cpp +++ b/services/surfaceflinger/ScreenCaptureOutput.cpp @@ -32,6 +32,7 @@ std::shared_ptr createScreenCaptureOutput(ScreenCaptureOutp bool>(args.compositionEngine, args.renderArea, args.colorProfile, args.regionSampling, args.dimInGammaSpaceForEnhancedScreenshots); output->editState().isSecure = args.renderArea.isSecure(); + output->editState().isProtected = args.isProtected; output->setCompositionEnabled(true); output->setLayerFilter({args.layerStack}); output->setRenderSurface(std::make_unique(std::move(args.buffer))); -- cgit v1.2.3-59-g8ed1b