From cd1580cb3fe40e225000a56c9b4ee43c0ce0a45d Mon Sep 17 00:00:00 2001 From: Ady Abraham Date: Mon, 29 Apr 2019 15:40:03 -0700 Subject: SurfaceFlinger: fix deferred transactions for buffers with timestamps A deferred transaction needs to wait until the buffer is ready to be latched. This means that the buffer needs to be: 1. Done with rendering (fence has signaled) 2. Present timestamp is within the boundary of the next vsync Test: Screen rotation with Chrome Bug: 130785247 Change-Id: I8def1f10ea3d5c253ab14fa3aa4445588fc2ba8b --- libs/gui/BufferQueueConsumer.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'libs/gui/BufferQueueConsumer.cpp') diff --git a/libs/gui/BufferQueueConsumer.cpp b/libs/gui/BufferQueueConsumer.cpp index e2261360b6..528bfb194e 100644 --- a/libs/gui/BufferQueueConsumer.cpp +++ b/libs/gui/BufferQueueConsumer.cpp @@ -94,8 +94,6 @@ status_t BufferQueueConsumer::acquireBuffer(BufferItem* outBuffer, // Skip this if we're in shared buffer mode and the queue is empty, // since in that case we'll just return the shared buffer. if (expectedPresent != 0 && !mCore->mQueue.empty()) { - const int MAX_REASONABLE_NSEC = 1000000000ULL; // 1 second - // The 'expectedPresent' argument indicates when the buffer is expected // to be presented on-screen. If the buffer's desired present time is // earlier (less) than expectedPresent -- meaning it will be displayed -- cgit v1.2.3-59-g8ed1b