From 1585c4d9fbbba3ba70ae625923b85cd02cb8a0fd Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Fri, 28 Jun 2013 13:52:40 -0700 Subject: Pay attention to buffer timestamps When acquiring a buffer, SurfaceFlinger now computes the expected presentation time and passes it to the BufferQueue acquireBuffer() method. If it's not yet time to display the buffer, acquireBuffer() returns PRESENT_LATER instead of a buffer. The current implementation of the expected-present-time computation uses approximations and guesswork. Bug 7900302 Change-Id: If9345611c5983a11a811935aaf27d6388a5036f1 --- libs/gui/CpuConsumer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/gui/CpuConsumer.cpp') diff --git a/libs/gui/CpuConsumer.cpp b/libs/gui/CpuConsumer.cpp index 123b47056c..56bc7c66ea 100644 --- a/libs/gui/CpuConsumer.cpp +++ b/libs/gui/CpuConsumer.cpp @@ -79,7 +79,7 @@ status_t CpuConsumer::lockNextBuffer(LockedBuffer *nativeBuffer) { Mutex::Autolock _l(mMutex); - err = acquireBufferLocked(&b); + err = acquireBufferLocked(&b, 0); if (err != OK) { if (err == BufferQueue::NO_BUFFER_AVAILABLE) { return BAD_VALUE; -- cgit v1.2.3-59-g8ed1b