Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82f68316 authored by Naomi Luis's avatar Naomi Luis Committed by Steve Kondik
Browse files

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
parent dc8c5a3f
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -547,6 +547,8 @@ status_t BufferQueue::queueBuffer(int buf,
                Fifo::iterator front(mQueue.begin());
                Fifo::iterator front(mQueue.begin());
                // buffer currently queued is freed
                // buffer currently queued is freed
                mSlots[*front].mBufferState = BufferSlot::FREE;
                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
                // and we record the new buffer index in the queued list
                *front = buf;
                *front = buf;
            }
            }