SurfaceFlinger: correctly pass desired present time for BLAST
Pass whether a desired present time is automatically
populated or not to match BufferStateLayer behavior to the one
we have for BufferQueueLayer.
Bug: 169901895
Test: expand notification shade and observe systrace
Change-Id: Ia02c5633d46dde67d2c3be33b084d63c40c2afb0
diff --git a/libs/gui/BLASTBufferQueue.cpp b/libs/gui/BLASTBufferQueue.cpp
index 8328322..9fc5495 100644
--- a/libs/gui/BLASTBufferQueue.cpp
+++ b/libs/gui/BLASTBufferQueue.cpp
@@ -311,7 +311,9 @@
t->setCrop(mSurfaceControl, computeCrop(bufferItem));
t->setTransform(mSurfaceControl, bufferItem.mTransform);
t->setTransformToDisplayInverse(mSurfaceControl, bufferItem.mTransformToDisplayInverse);
- t->setDesiredPresentTime(bufferItem.mTimestamp);
+ if (!bufferItem.mIsAutoTimestamp) {
+ t->setDesiredPresentTime(bufferItem.mTimestamp);
+ }
t->setFrameNumber(mSurfaceControl, bufferItem.mFrameNumber);
if (!mNextFrameTimelineVsyncIdQueue.empty()) {