blast: adding a buffer doesn't make the frame dirty
The frame shouldn't be marked as dirty when a new buffer is set.
When a frame is marked as dirty, it forces SurfaceFlinger to do
extra work on the CPU which hurts power/performance.
Bug: 125859110
Test: Take a systrace when running the Blast Chrome.apk. Check that
there is no extra work done.
Change-Id: I0cf9802f495a7e9f2e5b1f4e58f0a7a4a75d8225
diff --git a/services/surfaceflinger/BufferStateLayer.cpp b/services/surfaceflinger/BufferStateLayer.cpp
index a3d5b89..292d4a5 100644
--- a/services/surfaceflinger/BufferStateLayer.cpp
+++ b/services/surfaceflinger/BufferStateLayer.cpp
@@ -198,7 +198,6 @@
mReleasePreviousBuffer = true;
}
- mCurrentState.sequence++;
mCurrentState.buffer = buffer;
mCurrentState.modified = true;
setTransactionFlags(eTransactionNeeded);
@@ -217,7 +216,6 @@
bool BufferStateLayer::setDataspace(ui::Dataspace dataspace) {
if (mCurrentState.dataspace == dataspace) return false;
- mCurrentState.sequence++;
mCurrentState.dataspace = dataspace;
mCurrentState.modified = true;
setTransactionFlags(eTransactionNeeded);