summaryrefslogtreecommitdiff
path: root/libs/gui/LayerState.cpp
diff options
context:
space:
mode:
author Robert Carr <racarr@google.com> 2018-08-15 13:12:42 -0700
committer Robert Carr <racarr@google.com> 2018-08-27 18:14:20 -0700
commitd314f169d79d8a3b1de4289190c3f420188426f6 (patch)
treeab266d1c47bbf1be243e2c4c1f613e85dfae77f3 /libs/gui/LayerState.cpp
parent38f38f388cea1a751e967970742e5479a8d807e5 (diff)
Safe-guard Transaction::merge against programmer error.
We can warn on unmerged properties ensuring that this function is updated when new properties are added. Test: None. Change-Id: I718b0e73e8fb5543360ec82a6f0645eb8be8a25c
Diffstat (limited to 'libs/gui/LayerState.cpp')
-rw-r--r--libs/gui/LayerState.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp
index 931c446275..05c24c5e1a 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -318,6 +318,10 @@ void layer_state_t::merge(const layer_state_t& other) {
what |= eSidebandStreamChanged;
sidebandStream = other.sidebandStream;
}
+
+ if (other.what != what) {
+ ALOGE("Unmerged SurfaceComposer Transaction properties. LayerState::merge needs updating?");
+ }
}
}; // namespace android