From 95631e357195cbb70b76918e7e4c745ff4d82c90 Mon Sep 17 00:00:00 2001 From: chaviw Date: Tue, 9 Jun 2020 13:43:32 -0700 Subject: Use fenceTime from drawingState instead of bufferInfo BufferInfo is updated in latchBuffer after updateTexImage. It would be difficult to move gatherBufferInfo before updateTexImage since BufferQueueLayer calls consumer->updateTexImage and relies on the consumer getting pdated to get the correct buffer information. BufferStateLayer gets the information directly from mDrawingState. Instead just use the fenceTime from drawingState in updateTexImage in BufferStateLayer. Test: No easy way to see the issue Fixes: 158457345 Change-Id: If42af7c2f8d550ce73181443a69b0f3073805e1c --- services/surfaceflinger/BufferStateLayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/surfaceflinger/BufferStateLayer.cpp b/services/surfaceflinger/BufferStateLayer.cpp index 464ea9fa1e..790f2ece77 100644 --- a/services/surfaceflinger/BufferStateLayer.cpp +++ b/services/surfaceflinger/BufferStateLayer.cpp @@ -578,7 +578,7 @@ status_t BufferStateLayer::updateTexImage(bool& /*recomputeVisibleRegions*/, nse } mFlinger->mTimeStats->setAcquireFence(layerId, mDrawingState.frameNumber, - mBufferInfo.mFenceTime); + std::make_shared(mDrawingState.acquireFence)); mFlinger->mTimeStats->setLatchTime(layerId, mDrawingState.frameNumber, latchTime); mCurrentStateModified = false; -- cgit v1.2.3-59-g8ed1b