From 82f683163da43b4e389594af833a33832b24750f Mon Sep 17 00:00:00 2001 From: Naomi Luis Date: Mon, 25 Feb 2013 12:37:08 -0800 Subject: Reset the FrameNumber for dropped frame in async mode In Async, reset the framenumber of frames dropped by the BufferQueue. This allows the client to dequeue and use this frame before the other queued frames which may be with the MDP. CRs-fixed: 448606 Change-Id: Icaabf77b55a7275dc98ba1fdfba89508feb92145 --- libs/gui/BufferQueue.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/gui/BufferQueue.cpp b/libs/gui/BufferQueue.cpp index 086e298..9f9b441 100644 --- a/libs/gui/BufferQueue.cpp +++ b/libs/gui/BufferQueue.cpp @@ -547,6 +547,8 @@ status_t BufferQueue::queueBuffer(int buf, Fifo::iterator front(mQueue.begin()); // buffer currently queued is freed mSlots[*front].mBufferState = BufferSlot::FREE; + // reset the frame number of the freed buffer + mSlots[*front].mFrameNumber = 0; // and we record the new buffer index in the queued list *front = buf; } -- cgit v1.1