diff options
author | Mathias Agopian <mathias@google.com> | 2013-08-02 01:40:18 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2013-08-06 20:05:36 +0000 |
commit | db89edc94bd2a78226b407f9f7261e202e7fa325 (patch) | |
tree | 007ffcc43a42459a5a089d3be8c51f81d40dd096 /libs/gui/CpuConsumer.cpp | |
parent | 687821c05b5a85db1b172e7599861c803d268a8d (diff) | |
download | frameworks_native-db89edc94bd2a78226b407f9f7261e202e7fa325.zip frameworks_native-db89edc94bd2a78226b407f9f7261e202e7fa325.tar.gz frameworks_native-db89edc94bd2a78226b407f9f7261e202e7fa325.tar.bz2 |
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
Diffstat (limited to 'libs/gui/CpuConsumer.cpp')
-rw-r--r-- | libs/gui/CpuConsumer.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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<BufferQueue>& bq, +CpuConsumer::CpuConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t maxLockedBuffers, bool controlledByApp) : ConsumerBase(bq, controlledByApp), mMaxLockedBuffers(maxLockedBuffers), @@ -39,8 +39,8 @@ CpuConsumer::CpuConsumer(const sp<BufferQueue>& 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) { |