summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishnu Nair <vishnun@google.com>2022-01-07 16:36:18 -0800
committerVishnu Nair <vishnun@google.com>2022-01-08 01:41:25 +0000
commit677a3ec523558ed9d41422f51a92a7cc485e2411 (patch)
tree8c3759791ee80d45765c21d38498002f6b31ee32
parentb6f8479039c1462a0f2e041d6376e3e208bbb70f (diff)
downloadnative-677a3ec523558ed9d41422f51a92a7cc485e2411.tar.gz
DO NOT MERGE SF: Fix releaseBufferEndpoint merge issue
If a transaction contained a cached buffer, and was parcelled then merged, the releaseBufferEndpoint would not be merged correctly. This would result in SF not releasing a buffer and the app eventually ANRing. DO NOT MERGE because this issue doesn't exist in master Bug: b/205791752 Test: manually rotate apps to trigger sync transactions and check the logs to see we don't release stale buffers. Real tests to follow Change-Id: Ibd295be5e06fea00b331610206f1664f651afed3
-rw-r--r--libs/gui/LayerState.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp
index d266229a8e..77a883b332 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -509,6 +509,7 @@ void layer_state_t::merge(const layer_state_t& other) {
if (other.what & eCachedBufferChanged) {
what |= eCachedBufferChanged;
cachedBuffer = other.cachedBuffer;
+ releaseBufferEndpoint = other.releaseBufferEndpoint;
}
if (other.what & eBackgroundColorChanged) {
what |= eBackgroundColorChanged;