OSDN Git Service

CpuConsumer: Properly track acquired buffers
authorEino-Ville Talvala <etalvala@google.com>
Fri, 1 Mar 2013 02:23:24 +0000 (18:23 -0800)
committerEino-Ville Talvala <etalvala@google.com>
Tue, 5 Mar 2013 23:25:06 +0000 (15:25 -0800)
commit042ecee2abf8584585f1f22f661ac6be9689edf4
tree481452aa17f7c0a8e91ab2088234d877b5e51ab5
parentbbb57f3331c7182399ed82e9c4f93a965677dde3
CpuConsumer: Properly track acquired buffers

CpuConsumer cannot simply assume a slot's buffer is the same buffer
between acquire and release, and therefore it could be possible for
the same slot to get used for a second acquired buffer, if there's a
producer disconnect in between. This would cause a problem when the
first buffer is released by the consumer.

Instead, use an independent list of acquired buffers to properly track
their state.

Bug: 8291751
Change-Id: I0241ad8704e53d47318c7179b13daed8181b1fab
include/gui/CpuConsumer.h
libs/gui/CpuConsumer.cpp