diff options
| author | 2012-08-27 18:48:37 -0700 | |
|---|---|---|
| committer | 2012-08-30 18:26:09 -0700 | |
| commit | 72f096fb1ad0a0deadbfac5f88627461905d38e8 (patch) | |
| tree | b9053a47c5403de32ee622aba17af574323b5a11 /libs/gui/CpuConsumer.cpp | |
| parent | 1847f7fd799f92300b3786e49f5883eaa03f4507 (diff) | |
BufferQueue: use max acquired buffer count
This change makes BufferQueue derive the min undequeued buffer count from a max
acquired buffer count that is set by the consumer. This value may be set at
any time that a producer is not connected to the BufferQueue rather than at
BufferQueue construction time.
Change-Id: Icf9f1d91ec612a079968ba0a4621deffe48f4e22
Diffstat (limited to 'libs/gui/CpuConsumer.cpp')
| -rw-r--r-- | libs/gui/CpuConsumer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/gui/CpuConsumer.cpp b/libs/gui/CpuConsumer.cpp index 242ac45d30..fc4a85493c 100644 --- a/libs/gui/CpuConsumer.cpp +++ b/libs/gui/CpuConsumer.cpp @@ -30,7 +30,7 @@ namespace android { CpuConsumer::CpuConsumer(uint32_t maxLockedBuffers) : - ConsumerBase(new BufferQueue(true, maxLockedBuffers) ), + ConsumerBase(new BufferQueue(true) ), mMaxLockedBuffers(maxLockedBuffers), mCurrentLockedBuffers(0) { @@ -41,6 +41,7 @@ CpuConsumer::CpuConsumer(uint32_t maxLockedBuffers) : mBufferQueue->setSynchronousMode(true); mBufferQueue->setConsumerUsageBits(GRALLOC_USAGE_SW_READ_OFTEN); + mBufferQueue->setMaxAcquiredBufferCount(maxLockedBuffers); } CpuConsumer::~CpuConsumer() { |