diff options
| author | 2016-04-19 11:33:00 -0700 | |
|---|---|---|
| committer | 2016-04-19 19:01:00 +0000 | |
| commit | 245cc5b57da46d5852aa820be2a96f37425b3337 (patch) | |
| tree | 3000489b8e4b14cf392945bb644f1673bcbfe701 /libs/gui/BufferQueueConsumer.cpp | |
| parent | 9ffa1a4da16edc23067070f5605917ddd57739e8 (diff) | |
BQ: Avoid unnecessary calls to consumer listener
Try to avoid unnecessary calls to the consumer listener's
onBuffersReleased() since they can potentially deadlock.
Bug 28254168
Change-Id: Ib064e5ebe1403a1028589342b3c33e6f40bb54a9
Diffstat (limited to 'libs/gui/BufferQueueConsumer.cpp')
| -rw-r--r-- | libs/gui/BufferQueueConsumer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/gui/BufferQueueConsumer.cpp b/libs/gui/BufferQueueConsumer.cpp index b591c4e8ba..cbc88932ac 100644 --- a/libs/gui/BufferQueueConsumer.cpp +++ b/libs/gui/BufferQueueConsumer.cpp @@ -622,6 +622,10 @@ status_t BufferQueueConsumer::setMaxAcquiredBufferCount( return NO_INIT; } + if (maxAcquiredBuffers == mCore->mMaxAcquiredBufferCount) { + return NO_ERROR; + } + // The new maxAcquiredBuffers count should not be violated by the number // of currently acquired buffers int acquiredCount = 0; |