OSDN Git Service

Fix Surface slot caching
authorPablo Ceballos <pceballos@google.com>
Fri, 5 Feb 2016 21:39:27 +0000 (13:39 -0800)
committerPablo Ceballos <pceballos@google.com>
Wed, 10 Feb 2016 02:21:54 +0000 (18:21 -0800)
commit789a0c82cb370d6b82f401cc130af58c85802cbf
tree0d62a743da092ee5c95c92a07c4efbbb0e4cd43f
parentc5cec281654c5dee2273ce4bebd3a749c3a1119e
Fix Surface slot caching

- Now that it's possible to resize a BufferQueue while buffers are
  dequeued/acquired, it's no longer correct for Surface to clear its
  cache when the BufferQueue is resized since it must keep at least
  the currently dequeued buffers.
- Add an onSlotsFreed callback to IProducerListener so that producers
  that wish to be notified about buffers being freed can do so. Note
  that this isn't currently used in Surface.
- Review and fixup all the places where the producer/consumer
  listeners for freed buffers should be called.

Change-Id: I4ab0c92bc69b75a3c072ddf5d74d78f941dba4c8
include/gui/BufferQueueCore.h
include/gui/IProducerListener.h
libs/gui/BufferQueueConsumer.cpp
libs/gui/BufferQueueCore.cpp
libs/gui/BufferQueueProducer.cpp
libs/gui/IProducerListener.cpp
libs/gui/Surface.cpp
libs/gui/tests/IGraphicBufferProducer_test.cpp
libs/gui/tests/Surface_test.cpp