Loading libs/gui/BufferQueueConsumer.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -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; Loading libs/gui/BufferQueueProducer.cpp +11 −1 Original line number Diff line number Diff line Loading @@ -101,6 +101,10 @@ status_t BufferQueueProducer::setMaxDequeuedBufferCount( return NO_INIT; } if (maxDequeuedBuffers == mCore->mMaxDequeuedBufferCount) { return NO_ERROR; } // The new maxDequeuedBuffer count should not be violated by the number // of currently dequeued buffers int dequeuedCount = 0; Loading Loading @@ -175,6 +179,10 @@ status_t BufferQueueProducer::setAsyncMode(bool async) { return NO_INIT; } if (async == mCore->mAsyncMode) { return NO_ERROR; } if ((mCore->mMaxAcquiredBufferCount + mCore->mMaxDequeuedBufferCount + (async || mCore->mDequeueBufferCannotBlock ? 1 : 0)) > mCore->mMaxBufferCount) { Loading @@ -199,7 +207,9 @@ status_t BufferQueueProducer::setAsyncMode(bool async) { mCore->mAsyncMode = async; VALIDATE_CONSISTENCY(); mCore->mDequeueCondition.broadcast(); if (delta < 0) { listener = mCore->mConsumerListener; } } // Autolock scope // Call back without lock held Loading Loading
libs/gui/BufferQueueConsumer.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -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; Loading
libs/gui/BufferQueueProducer.cpp +11 −1 Original line number Diff line number Diff line Loading @@ -101,6 +101,10 @@ status_t BufferQueueProducer::setMaxDequeuedBufferCount( return NO_INIT; } if (maxDequeuedBuffers == mCore->mMaxDequeuedBufferCount) { return NO_ERROR; } // The new maxDequeuedBuffer count should not be violated by the number // of currently dequeued buffers int dequeuedCount = 0; Loading Loading @@ -175,6 +179,10 @@ status_t BufferQueueProducer::setAsyncMode(bool async) { return NO_INIT; } if (async == mCore->mAsyncMode) { return NO_ERROR; } if ((mCore->mMaxAcquiredBufferCount + mCore->mMaxDequeuedBufferCount + (async || mCore->mDequeueBufferCannotBlock ? 1 : 0)) > mCore->mMaxBufferCount) { Loading @@ -199,7 +207,9 @@ status_t BufferQueueProducer::setAsyncMode(bool async) { mCore->mAsyncMode = async; VALIDATE_CONSISTENCY(); mCore->mDequeueCondition.broadcast(); if (delta < 0) { listener = mCore->mConsumerListener; } } // Autolock scope // Call back without lock held Loading