blast: update hasDrawingBuffer to hasFrameUpdate
hasFrameUpdate is a more accurate name than hasDrawingBuffer.
Also keep track of when the current state has been modified
and only return true for BufferStateLayer::hasFrameUpdate
when the state has been modified and the buffer is not null.
Test: Transaction_test
Bug: 80477568
Change-Id: Icec6cf62490799988bd967914986bf92a07ce726
diff --git a/services/surfaceflinger/BufferLayer.cpp b/services/surfaceflinger/BufferLayer.cpp
index 440f1e2..b35bd6c 100644
--- a/services/surfaceflinger/BufferLayer.cpp
+++ b/services/surfaceflinger/BufferLayer.cpp
@@ -522,7 +522,7 @@
}
bool BufferLayer::hasReadyFrame() const {
- return hasDrawingBuffer() || getSidebandStreamChanged() || getAutoRefresh();
+ return hasFrameUpdate() || getSidebandStreamChanged() || getAutoRefresh();
}
uint32_t BufferLayer::getEffectiveScalingMode() const {
@@ -660,7 +660,7 @@
}
uint64_t BufferLayer::getHeadFrameNumber() const {
- if (hasDrawingBuffer()) {
+ if (hasFrameUpdate()) {
return getFrameNumber();
} else {
return mCurrentFrameNumber;