OSDN Git Service

libgui: Change BufferQueue to use free lists
authorDan Stoza <stoza@google.com>
Thu, 16 Apr 2015 22:39:18 +0000 (15:39 -0700)
committerDan Stoza <stoza@google.com>
Fri, 17 Apr 2015 16:28:41 +0000 (09:28 -0700)
commit8dddc990103b71137be2a6365a26b1ac36598e68
treea3e41d09c0483314a10bb676d851778ee2bfbb75
parent2e398e64b3bc827ec8caaa1457442a8b3d546aed
libgui: Change BufferQueue to use free lists

BufferQueue used to choose free buffers by scanning through its array
of slots and picking one based on timestamp. This changes that
mechanism to use a pair of free lists: one with buffers attached and
one without. This makes it easier to choose either type of free slot
depending on the needs of the current operation.

Bug: 13175420
Change-Id: Ic8398e7511bd11a60a1c82e3ad2ee271c9822be1
include/gui/BufferQueueCore.h
libs/gui/BufferQueueConsumer.cpp
libs/gui/BufferQueueCore.cpp
libs/gui/BufferQueueProducer.cpp