summaryrefslogtreecommitdiff
path: root/libs/gui/LayerState.cpp
diff options
context:
space:
mode:
author Vishnu Nair <vishnun@google.com> 2019-07-16 14:15:33 -0700
committer Vishnu Nair <vishnun@google.com> 2019-07-16 14:15:33 -0700
commit996bc421ea90965e384c947f5a68394afb95bd88 (patch)
treeb78cf2c9e96ef4b89a2e8d4a7f98cd0d39eccf1b /libs/gui/LayerState.cpp
parentf9f627bf75a0507d760997d417c0b9d9ae2d5a7f (diff)
Properly merge flags when merging transactions
Test: atest SurfaceFlinger_test Change-Id: Ib1446c5afe00fd2588f7682f33cbbc6d6eb6a1ea
Diffstat (limited to 'libs/gui/LayerState.cpp')
-rw-r--r--libs/gui/LayerState.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp
index 6066421faf..aa07cbe0ab 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -267,8 +267,9 @@ void layer_state_t::merge(const layer_state_t& other) {
}
if (other.what & eFlagsChanged) {
what |= eFlagsChanged;
- flags = other.flags;
- mask = other.mask;
+ flags &= ~other.mask;
+ flags |= (other.flags & other.mask);
+ mask |= other.mask;
}
if (other.what & eLayerStackChanged) {
what |= eLayerStackChanged;