summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/DisplayRenderArea.cpp
diff options
context:
space:
mode:
author Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2024-06-28 23:16:56 +0000
committer Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2024-06-28 23:16:56 +0000
commit5601165bcd76f0242862b7206d097f776805dc8f (patch)
treeebc222a5f27ca3dd861eb763d0750a24516dcc31 /services/surfaceflinger/DisplayRenderArea.cpp
parentfbdbde9a77001535e3d0a3045ff7940ffa8d1bf9 (diff)
parent96a5aaf57b4432cb3d5cb4a2327ab548b262354b (diff)
Merge cherrypicks of ['googleplex-android-review.googlesource.com/28059895'] into 24Q3-release.
Change-Id: Id35732bcee8281eeee000cfa1166d50636897d94
Diffstat (limited to 'services/surfaceflinger/DisplayRenderArea.cpp')
-rw-r--r--services/surfaceflinger/DisplayRenderArea.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/services/surfaceflinger/DisplayRenderArea.cpp b/services/surfaceflinger/DisplayRenderArea.cpp
index 55b395b458..c63c738d34 100644
--- a/services/surfaceflinger/DisplayRenderArea.cpp
+++ b/services/surfaceflinger/DisplayRenderArea.cpp
@@ -22,22 +22,20 @@ namespace android {
std::unique_ptr<RenderArea> DisplayRenderArea::create(wp<const DisplayDevice> displayWeak,
const Rect& sourceCrop, ui::Size reqSize,
ui::Dataspace reqDataSpace,
- bool hintForSeamlessTransition,
- bool allowSecureLayers) {
+ ftl::Flags<Options> options) {
if (auto display = displayWeak.promote()) {
// Using new to access a private constructor.
- return std::unique_ptr<DisplayRenderArea>(
- new DisplayRenderArea(std::move(display), sourceCrop, reqSize, reqDataSpace,
- hintForSeamlessTransition, allowSecureLayers));
+ return std::unique_ptr<DisplayRenderArea>(new DisplayRenderArea(std::move(display),
+ sourceCrop, reqSize,
+ reqDataSpace, options));
}
return nullptr;
}
DisplayRenderArea::DisplayRenderArea(sp<const DisplayDevice> display, const Rect& sourceCrop,
ui::Size reqSize, ui::Dataspace reqDataSpace,
- bool hintForSeamlessTransition, bool allowSecureLayers)
- : RenderArea(reqSize, CaptureFill::OPAQUE, reqDataSpace, hintForSeamlessTransition,
- allowSecureLayers),
+ ftl::Flags<Options> options)
+ : RenderArea(reqSize, CaptureFill::OPAQUE, reqDataSpace, options),
mDisplay(std::move(display)),
mSourceCrop(sourceCrop) {}
@@ -46,7 +44,7 @@ const ui::Transform& DisplayRenderArea::getTransform() const {
}
bool DisplayRenderArea::isSecure() const {
- return mAllowSecureLayers && mDisplay->isSecure();
+ return mOptions.test(Options::CAPTURE_SECURE_LAYERS) && mDisplay->isSecure();
}
sp<const DisplayDevice> DisplayRenderArea::getDisplayDevice() const {