78014f32da
BufferQueueProducer::allocateBuffers used to keep the BufferQueueCore
mutex while doing the buffer allocation, which would cause the consumer
(which also needs the mutex) to block if the allocation takes a long
time.
Instead, release the mutex while doing the allocation, and grab it again
before filling the slots. Keep a bool state and a condvar to prevent
other producers from trying to allocate the slots while the mutex is
released.
Bug: 11792166
Change-Id: I4ab1319995ef892be2beba892f1fdbf50ce0416d
(cherry picked from commit
|
||
---|---|---|
.. | ||
tests | ||
Android.mk | ||
BitTube.cpp | ||
BufferItem.cpp | ||
BufferItemConsumer.cpp | ||
BufferQueue.cpp | ||
BufferQueueConsumer.cpp | ||
BufferQueueCore.cpp | ||
BufferQueueProducer.cpp | ||
BufferSlot.cpp | ||
CleanSpec.mk | ||
ConsumerBase.cpp | ||
CpuConsumer.cpp | ||
DisplayEventReceiver.cpp | ||
GLConsumer.cpp | ||
GraphicBufferAlloc.cpp | ||
GuiConfig.cpp | ||
IConsumerListener.cpp | ||
IDisplayEventConnection.cpp | ||
IGraphicBufferAlloc.cpp | ||
IGraphicBufferConsumer.cpp | ||
IGraphicBufferProducer.cpp | ||
IProducerListener.cpp | ||
ISensorEventConnection.cpp | ||
ISensorServer.cpp | ||
ISurfaceComposer.cpp | ||
ISurfaceComposerClient.cpp | ||
LayerState.cpp | ||
Sensor.cpp | ||
SensorEventQueue.cpp | ||
SensorManager.cpp | ||
StreamSplitter.cpp | ||
Surface.cpp | ||
SurfaceComposerClient.cpp | ||
SurfaceControl.cpp | ||
SyncFeatures.cpp |