summaryrefslogtreecommitdiff
path: root/libs/gui/LayerState.cpp
diff options
context:
space:
mode:
author Winson Chung <winsonc@google.com> 2021-07-23 01:21:34 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2021-07-23 01:21:34 +0000
commit374fbaef5554cfa67b8de5a58fd053647abd2666 (patch)
treeaf455afa01e8dfd58cc13cf6cfe5aed9bb6ada8b /libs/gui/LayerState.cpp
parent1f8765ba133d4a0ee87063e3714e244148a6ccc9 (diff)
parent5eaa7c313627d872ced846dfd0c83b128a389914 (diff)
Merge "Add mechanism for a task's windows to be trusted overlays (SF)" into sc-dev am: 5eaa7c3136
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15150900 Change-Id: I7815e2f2c420832087f873adb6d13d126f42cecc
Diffstat (limited to 'libs/gui/LayerState.cpp')
-rw-r--r--libs/gui/LayerState.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp
index 2d99fc1903..076c90dd23 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -64,6 +64,7 @@ layer_state_t::layer_state_t()
fixedTransformHint(ui::Transform::ROT_INVALID),
frameNumber(0),
autoRefresh(false),
+ isTrustedOverlay(false),
bufferCrop(Rect::INVALID_RECT),
destinationFrame(Rect::INVALID_RECT),
releaseBufferListener(nullptr) {
@@ -170,6 +171,7 @@ status_t layer_state_t::write(Parcel& output) const
SAFE_PARCEL(output.write, stretchEffect);
SAFE_PARCEL(output.write, bufferCrop);
SAFE_PARCEL(output.write, destinationFrame);
+ SAFE_PARCEL(output.writeBool, isTrustedOverlay);
return NO_ERROR;
}
@@ -300,6 +302,7 @@ status_t layer_state_t::read(const Parcel& input)
SAFE_PARCEL(input.read, stretchEffect);
SAFE_PARCEL(input.read, bufferCrop);
SAFE_PARCEL(input.read, destinationFrame);
+ SAFE_PARCEL(input.readBool, &isTrustedOverlay);
return NO_ERROR;
}
@@ -532,6 +535,10 @@ void layer_state_t::merge(const layer_state_t& other) {
what |= eAutoRefreshChanged;
autoRefresh = other.autoRefresh;
}
+ if (other.what & eTrustedOverlayChanged) {
+ what |= eTrustedOverlayChanged;
+ isTrustedOverlay = other.isTrustedOverlay;
+ }
if (other.what & eReleaseBufferListenerChanged) {
if (releaseBufferListener) {
ALOGW("Overriding releaseBufferListener");