From 677a3ec523558ed9d41422f51a92a7cc485e2411 Mon Sep 17 00:00:00 2001 From: Vishnu Nair Date: Fri, 7 Jan 2022 16:36:18 -0800 Subject: 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 --- libs/gui/LayerState.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'libs/gui/LayerState.cpp') 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; -- cgit v1.2.3-59-g8ed1b