summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaomi Luis <nluis@codeaurora.org>2013-02-25 12:37:08 -0800
committerSteve Kondik <shade@chemlab.org>2013-03-06 01:22:39 -0800
commit82f683163da43b4e389594af833a33832b24750f (patch)
treeef940c34b4298d9b2100dcb94da6c57846f249a9
parentdc8c5a3fa56937ee357798f9feefc0b0ab74a63c (diff)
downloadframeworks_native-82f683163da43b4e389594af833a33832b24750f.zip
frameworks_native-82f683163da43b4e389594af833a33832b24750f.tar.gz
frameworks_native-82f683163da43b4e389594af833a33832b24750f.tar.bz2
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
-rw-r--r--libs/gui/BufferQueue.cpp2
1 files changed, 2 insertions, 0 deletions
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;
}