From a4650a50a0b35e9e4342d6600b6eb24fd94bb8e5 Mon Sep 17 00:00:00 2001 From: Dan Stoza Date: Tue, 12 May 2015 12:56:16 -0700 Subject: Fix PTS handling for buffer replacement This changes the way that SurfaceFlinger's shadow buffer management works such that instead of tracking the size of the shadow queue in the BufferQueue, SF tracks the last frame number it has seen, and passes that into the acquireBuffer call. BufferQueueConsumer then ensures that it never returns a buffer newer than that frame number, even if that means that it must return PRESENT_LATER for an otherwise valid buffer. Change-Id: I3fcb45f683ed660c3f18a8b85ae1f8a962ba6f0e --- include/gui/ConsumerBase.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/gui/ConsumerBase.h') diff --git a/include/gui/ConsumerBase.h b/include/gui/ConsumerBase.h index 5be3ffb8d3..f46bf014f1 100644 --- a/include/gui/ConsumerBase.h +++ b/include/gui/ConsumerBase.h @@ -152,7 +152,8 @@ protected: // initialization that must take place the first time a buffer is assigned // to a slot. If it is overridden the derived class's implementation must // call ConsumerBase::acquireBufferLocked. - virtual status_t acquireBufferLocked(BufferItem *item, nsecs_t presentWhen); + virtual status_t acquireBufferLocked(BufferItem *item, nsecs_t presentWhen, + uint64_t maxFrameNumber = 0); // releaseBufferLocked relinquishes control over a buffer, returning that // control to the BufferQueue. -- cgit v1.2.3-59-g8ed1b