OSDN Git Service

Fix a race in BufferQueue
authorMathias Agopian <mathias@google.com>
Wed, 24 Jul 2013 04:50:20 +0000 (21:50 -0700)
committerMathias Agopian <mathias@google.com>
Wed, 24 Jul 2013 04:55:32 +0000 (21:55 -0700)
commit6bac363cbdca7f5c4135d66c0e379475ecbd7319
tree4d03542e3fb573b092b3ba2585ba9d0ea06da573
parent7ffaa7c60d51cc0eb731158de2ac3df9c50cc0b4
Fix a race in BufferQueue

BufferQueue::dequeueBuffer() could incorrectly return
WOULD_BLOCK while in "cannot block" mode if it happened
while a consumer acquired the last allowed buffer
before releasing the old one (which is a valid thing
to do).

Change-Id: I318e5408871ba85e068ea9ef4dc9b578f1bb1043
libs/gui/BufferQueue.cpp