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
diff --git a/services/surfaceflinger/BufferStateLayer.cpp b/services/surfaceflinger/BufferStateLayer.cpp
index 6b5cf04..c662bc2 100644
--- a/services/surfaceflinger/BufferStateLayer.cpp
+++ b/services/surfaceflinger/BufferStateLayer.cpp
@@ -725,7 +725,7 @@
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,