From 567dbbb6dd42be5013fcde0dadb3316d85f2fa0d Mon Sep 17 00:00:00 2001 From: Pablo Ceballos Date: Wed, 26 Aug 2015 18:59:08 -0700 Subject: 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 --- libs/gui/BufferQueueConsumer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libs/gui/BufferQueueConsumer.cpp') 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; } -- cgit v1.2.3-59-g8ed1b