summaryrefslogtreecommitdiff
path: root/libs/gui/BufferQueueConsumer.cpp
diff options
context:
space:
mode:
author Pablo Ceballos <pceballos@google.com> 2015-08-26 18:59:08 -0700
committer Pablo Ceballos <pceballos@google.com> 2015-09-24 15:22:42 -0700
commit567dbbb6dd42be5013fcde0dadb3316d85f2fa0d (patch)
tree5072cd29a7d0dc5be17f5a27f805c42c12ebcdbb /libs/gui/BufferQueueConsumer.cpp
parent1ec0f48cbd44a56c360d075849655ab2c3f36476 (diff)
BQ: get rid of async in producer interface
- Get rid of the async flag in dequeueBuffer, allocateBuffers, waitForFreeSlotThenRelock, and QueueBufferInput. - Instead use the persistent flags mDequeueBufferCannotBlock and mAsyncMode to determine whether to use the async behavior. Bug 13174928 Change-Id: Ie6f7b9e46ee3844ee77b102003c84dddf1bcafdd
Diffstat (limited to 'libs/gui/BufferQueueConsumer.cpp')
-rw-r--r--libs/gui/BufferQueueConsumer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/gui/BufferQueueConsumer.cpp b/libs/gui/BufferQueueConsumer.cpp
index 950a07400b..d52b47f3b0 100644
--- a/libs/gui/BufferQueueConsumer.cpp
+++ b/libs/gui/BufferQueueConsumer.cpp
@@ -527,11 +527,13 @@ status_t BufferQueueConsumer::setMaxAcquiredBufferCount(
}
if ((maxAcquiredBuffers + mCore->mMaxDequeuedBufferCount +
- (mCore->mAsyncMode ? 1 : 0)) > mCore->mMaxBufferCount) {
+ (mCore->mAsyncMode || mCore->mDequeueBufferCannotBlock ? 1 : 0)) >
+ mCore->mMaxBufferCount) {
BQ_LOGE("setMaxAcquiredBufferCount: %d acquired buffers would exceed "
"the maxBufferCount (%d) (maxDequeued %d async %d)",
maxAcquiredBuffers, mCore->mMaxBufferCount,
- mCore->mMaxDequeuedBufferCount, mCore->mAsyncMode);
+ mCore->mMaxDequeuedBufferCount, mCore->mAsyncMode ||
+ mCore->mDequeueBufferCannotBlock);
return BAD_VALUE;
}