summaryrefslogtreecommitdiff
path: root/libs/gui/LayerState.cpp
diff options
context:
space:
mode:
author Winson Chung <winsonc@google.com> 2021-07-23 01:44:13 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2021-07-23 01:44:13 +0000
commit077793ebbd5d972308e92bcb9795d49e2b04668c (patch)
tree23fe6d73e7d7951d8583b5e52d0e226e02eaf79b /libs/gui/LayerState.cpp
parentaca437471cec8906330cb10e57dcba1a7ca91b7c (diff)
parenta0de3613cfa098c5abc19da1c5ec6821bf665c1d (diff)
Merge "Add mechanism for a task's windows to be trusted overlays (SF)" into sc-dev am: 5eaa7c3136 am: a0de3613cf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15150900 Change-Id: I27c503bb7d948499ebadafbd65dfdaf570d95d81
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 d73470dd0b..23895c0c9f 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -67,6 +67,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) {
@@ -171,6 +172,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;
}
@@ -299,6 +301,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;
}
@@ -534,6 +537,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");