From 315f3c74f68483241ee523126aff925d8ddeda74 Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Thu, 24 Jun 2021 21:58:09 -0700 Subject: Fix latching of final buffer when moving off-screen and destroying Previously processing of mLayersPendingRemoval was happening after doTransaction, but now it is happening before. doTransaction is still responsible for latching mDrawingStateModified = mDrawingState.modified. The distinction between the two is now rather meaningless and should be eliminated in a future CL, for now we simply unblock the check, by ensuring hasFrameUpdate will return true even if we haven't called doTransaction(). Test: Existing tests pass. CtsWidgetTestCases. Bug: 191514384 Change-Id: I6a18452020a3098a6c16b7c0d36a3c0f2b93a8fd --- services/surfaceflinger/BufferStateLayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'services/surfaceflinger/BufferStateLayer.cpp') diff --git a/services/surfaceflinger/BufferStateLayer.cpp b/services/surfaceflinger/BufferStateLayer.cpp index 6b5cf04536..c662bc2306 100644 --- a/services/surfaceflinger/BufferStateLayer.cpp +++ b/services/surfaceflinger/BufferStateLayer.cpp @@ -725,7 +725,7 @@ bool BufferStateLayer::latchSidebandStream(bool& recomputeVisibleRegions) { bool BufferStateLayer::hasFrameUpdate() const { const State& c(getDrawingState()); - return mDrawingStateModified && (c.buffer != nullptr || c.bgColorLayer != nullptr); + return (mDrawingStateModified || mDrawingState.modified) && (c.buffer != nullptr || c.bgColorLayer != nullptr); } status_t BufferStateLayer::updateTexImage(bool& /*recomputeVisibleRegions*/, nsecs_t latchTime, -- cgit v1.2.3-59-g8ed1b