From db89edc94bd2a78226b407f9f7261e202e7fa325 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Fri, 2 Aug 2013 01:40:18 -0700 Subject: All consumers now take an IGraphicBufferConsumer instead of a BufferQueue this means they only have access to the consumer end of the interface. we had a lot of code that assumed consumers where holding a BufferQueue (i.e.: both ends), so most of this change is untangling in fix that Bug: 9265647 Change-Id: Ic2e2596ee14c7535f51bf26d9a897a0fc036d22c --- libs/gui/CpuConsumer.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libs/gui/CpuConsumer.cpp') diff --git a/libs/gui/CpuConsumer.cpp b/libs/gui/CpuConsumer.cpp index b8c00af..3db46bc 100644 --- a/libs/gui/CpuConsumer.cpp +++ b/libs/gui/CpuConsumer.cpp @@ -30,7 +30,7 @@ namespace android { -CpuConsumer::CpuConsumer(const sp& bq, +CpuConsumer::CpuConsumer(const sp& bq, uint32_t maxLockedBuffers, bool controlledByApp) : ConsumerBase(bq, controlledByApp), mMaxLockedBuffers(maxLockedBuffers), @@ -39,8 +39,8 @@ CpuConsumer::CpuConsumer(const sp& bq, // Create tracking entries for locked buffers mAcquiredBuffers.insertAt(0, maxLockedBuffers); - mBufferQueue->setConsumerUsageBits(GRALLOC_USAGE_SW_READ_OFTEN); - mBufferQueue->setMaxAcquiredBufferCount(maxLockedBuffers); + mConsumer->setConsumerUsageBits(GRALLOC_USAGE_SW_READ_OFTEN); + mConsumer->setMaxAcquiredBufferCount(maxLockedBuffers); } CpuConsumer::~CpuConsumer() { @@ -52,19 +52,19 @@ CpuConsumer::~CpuConsumer() { void CpuConsumer::setName(const String8& name) { Mutex::Autolock _l(mMutex); mName = name; - mBufferQueue->setConsumerName(name); + mConsumer->setConsumerName(name); } status_t CpuConsumer::setDefaultBufferSize(uint32_t width, uint32_t height) { Mutex::Autolock _l(mMutex); - return mBufferQueue->setDefaultBufferSize(width, height); + return mConsumer->setDefaultBufferSize(width, height); } status_t CpuConsumer::setDefaultBufferFormat(uint32_t defaultFormat) { Mutex::Autolock _l(mMutex); - return mBufferQueue->setDefaultBufferFormat(defaultFormat); + return mConsumer->setDefaultBufferFormat(defaultFormat); } status_t CpuConsumer::lockNextBuffer(LockedBuffer *nativeBuffer) { -- cgit v1.1