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 /include/gui/ConsumerBase.h | |
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 'include/gui/ConsumerBase.h')
-rw-r--r-- | include/gui/ConsumerBase.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/include/gui/ConsumerBase.h b/include/gui/ConsumerBase.h index daad757..fb21185 100644 --- a/include/gui/ConsumerBase.h +++ b/include/gui/ConsumerBase.h @@ -66,10 +66,6 @@ public: // log messages. void setName(const String8& name); - // getBufferQueue returns the BufferQueue object to which this - // ConsumerBase is connected. - sp<BufferQueue> getBufferQueue() const; - // dump writes the current state to a string. Child classes should add // their state to the dump by overriding the dumpLocked method, which is // called by these methods after locking the mutex. @@ -85,12 +81,11 @@ private: void operator=(const ConsumerBase&); protected: - // ConsumerBase constructs a new ConsumerBase object to consume image - // buffers from the given BufferQueue. + // buffers from the given IGraphicBufferConsumer. // The controlledByApp flag indicates that this consumer is under the application's // control. - ConsumerBase(const sp<BufferQueue> &bufferQueue, bool controlledByApp = false); + ConsumerBase(const sp<IGraphicBufferConsumer>& consumer, bool controlledByApp = false); // onLastStrongRef gets called by RefBase just before the dtor of the most // derived class. It is used to clean up the buffers so that ConsumerBase @@ -104,7 +99,7 @@ protected: // from the derived class. virtual void onLastStrongRef(const void* id); - // Implementation of the BufferQueue::ConsumerListener interface. These + // Implementation of the IConsumerListener interface. These // calls are used to notify the ConsumerBase of asynchronous events in the // BufferQueue. These methods should not need to be overridden by derived // classes, but if they are overridden the ConsumerBase implementation @@ -155,7 +150,7 @@ protected: // initialization that must take place the first time a buffer is assigned // to a slot. If it is overridden the derived class's implementation must // call ConsumerBase::acquireBufferLocked. - virtual status_t acquireBufferLocked(BufferQueue::BufferItem *item, + virtual status_t acquireBufferLocked(IGraphicBufferConsumer::BufferItem *item, nsecs_t presentWhen); // releaseBufferLocked relinquishes control over a buffer, returning that @@ -226,7 +221,7 @@ protected: // The ConsumerBase has-a BufferQueue and is responsible for creating this object // if none is supplied - sp<BufferQueue> mBufferQueue; + sp<IGraphicBufferConsumer> mConsumer; // mMutex is the mutex used to prevent concurrent access to the member // variables of ConsumerBase objects. It must be locked whenever the |