Skip to content

Commit

Permalink
Reset the FrameNumber for dropped frame in async mode
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Naomi Luis authored and Whitehawkx committed Oct 1, 2013
1 parent 570c977 commit 0cb06a0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libs/gui/BufferQueue.cpp
Expand Up @@ -651,6 +651,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;
}
Expand Down

0 comments on commit 0cb06a0

Please sign in to comment.