summaryrefslogtreecommitdiff
path: root/libs/gui/LayerState.cpp
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2021-09-21 01:45:19 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2021-09-21 01:45:19 +0000
commitbbed4ebd98e3c2901070fb1d28e3ca82d320ba8c (patch)
tree1b793c4bb238a5a9935df5298714c7a6fbff0054 /libs/gui/LayerState.cpp
parent397ccc9217936fbd36a2d420b9b42741b7bda02b (diff)
parent4f2ea10357be90b703c1e459fe3a0d346cd0c97d (diff)
Merge "SurfaceControl: Add setDropInputMode api" into sc-v2-dev-plus-aosp
Diffstat (limited to 'libs/gui/LayerState.cpp')
-rw-r--r--libs/gui/LayerState.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp
index 8a7a8711bf..54735fa133 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -70,7 +70,8 @@ layer_state_t::layer_state_t()
isTrustedOverlay(false),
bufferCrop(Rect::INVALID_RECT),
destinationFrame(Rect::INVALID_RECT),
- releaseBufferListener(nullptr) {
+ releaseBufferListener(nullptr),
+ dropInputMode(gui::DropInputMode::NONE) {
matrix.dsdx = matrix.dtdy = 1.0f;
matrix.dsdy = matrix.dtdx = 0.0f;
hdrMetadata.validTypes = 0;
@@ -175,6 +176,7 @@ status_t layer_state_t::write(Parcel& output) const
SAFE_PARCEL(output.writeBool, isTrustedOverlay);
SAFE_PARCEL(output.writeStrongBinder, releaseBufferEndpoint);
+ SAFE_PARCEL(output.writeUint32, static_cast<uint32_t>(dropInputMode));
return NO_ERROR;
}
@@ -305,6 +307,10 @@ status_t layer_state_t::read(const Parcel& input)
SAFE_PARCEL(input.readBool, &isTrustedOverlay);
SAFE_PARCEL(input.readNullableStrongBinder, &releaseBufferEndpoint);
+
+ uint32_t mode;
+ SAFE_PARCEL(input.readUint32, &mode);
+ dropInputMode = static_cast<gui::DropInputMode>(mode);
return NO_ERROR;
}
@@ -563,6 +569,10 @@ void layer_state_t::merge(const layer_state_t& other) {
what |= eDestinationFrameChanged;
destinationFrame = other.destinationFrame;
}
+ if (other.what & eDropInputModeChanged) {
+ what |= eDropInputModeChanged;
+ dropInputMode = other.dropInputMode;
+ }
if ((other.what & what) != other.what) {
ALOGE("Unmerged SurfaceComposer Transaction properties. LayerState::merge needs updating? "
"other.what=0x%" PRIu64 " what=0x%" PRIu64,