summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mathias Agopian <mathias@google.com> 2013-07-18 22:25:55 -0700
committer Mathias Agopian <mathias@google.com> 2013-07-19 17:38:01 -0700
commit26a6f37cc06b8014edcedbee8d5558ca7da9abe3 (patch)
tree9b027da3c6ed61214c4a8fd38b0e2e417ae05cfd
parent7cdd786fa80cf03551291ae8feca7b77583be1c5 (diff)
make sure to reset the framenumber when a buffer is marked FREE
Change-Id: Ic45929f35553de209801f74e8006fb1bf0b25b45
-rw-r--r--libs/gui/BufferQueue.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/gui/BufferQueue.cpp b/libs/gui/BufferQueue.cpp
index cf8143135e..73bd4888ba 100644
--- a/libs/gui/BufferQueue.cpp
+++ b/libs/gui/BufferQueue.cpp
@@ -555,6 +555,9 @@ status_t BufferQueue::queueBuffer(int buf,
// buffer slot currently queued is marked free if still tracked
if (stillTracking(front)) {
mSlots[front->mBuf].mBufferState = BufferSlot::FREE;
+ // reset the frame number of the freed buffer so that it is the first in
+ // line to be dequeued again.
+ mSlots[front->mBuf].mFrameNumber = 0;
}
// and we record the new buffer in the queued list
*front = item;