Loading include/gui/BufferQueue.h +16 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,7 @@ public: virtual ~ProxyConsumerListener(); virtual void onFrameAvailable(); virtual void onBuffersReleased(); virtual void onSidebandStreamChanged(); private: // mConsumerListener is a weak reference to the IConsumerListener. This is // the raison d'etre of ProxyConsumerListener. Loading Loading @@ -253,6 +254,18 @@ public: // connected to the specified producer API. virtual status_t disconnect(int api); // Attaches a sideband buffer stream to the BufferQueue. // // A sideband stream is a device-specific mechanism for passing buffers // from the producer to the consumer without using dequeueBuffer/ // queueBuffer. If a sideband stream is present, the consumer can choose // whether to acquire buffers from the sideband stream or from the queued // buffers. // // Passing NULL or a different stream handle will detach the previous // handle if any. virtual status_t setSidebandStream(const sp<NativeHandle>& stream); /* * IGraphicBufferConsumer interface */ Loading Loading @@ -362,6 +375,9 @@ public: // NATIVE_WINDOW_TRANSFORM_ROT_90. The default is 0 (no transform). virtual status_t setTransformHint(uint32_t hint); // Retrieve the BufferQueue's sideband stream, if any. virtual sp<NativeHandle> getSidebandStream() const; // dump our state in a String virtual void dump(String8& result, const char* prefix) const; Loading include/gui/BufferQueueConsumer.h +3 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,9 @@ public: // NATIVE_WINDOW_TRANSFORM_ROT_90. The default is 0 (no transform). virtual status_t setTransformHint(uint32_t hint); // Retrieve the sideband buffer stream, if any. virtual sp<NativeHandle> getSidebandStream() const; // dump our state in a String virtual void dump(String8& result, const char* prefix) const; Loading include/gui/BufferQueueCore.h +4 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include <utils/Condition.h> #include <utils/Mutex.h> #include <utils/NativeHandle.h> #include <utils/RefBase.h> #include <utils/String8.h> #include <utils/StrongPointer.h> Loading Loading @@ -230,6 +231,9 @@ private: // mTransformHint is used to optimize for screen rotations. uint32_t mTransformHint; // mSidebandStream is a handle to the sideband buffer stream, if any sp<NativeHandle> mSidebandStream; }; // class BufferQueueCore } // namespace android Loading include/gui/BufferQueueProducer.h +12 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,18 @@ public: // connected to the specified producer API. virtual status_t disconnect(int api); // Attaches a sideband buffer stream to the IGraphicBufferProducer. // // A sideband stream is a device-specific mechanism for passing buffers // from the producer to the consumer without using dequeueBuffer/ // queueBuffer. If a sideband stream is present, the consumer can choose // whether to acquire buffers from the sideband stream or from the queued // buffers. // // Passing NULL or a different stream handle will detach the previous // handle if any. virtual status_t setSidebandStream(const sp<NativeHandle>& stream); private: // This is required by the IBinder::DeathRecipient interface virtual void binderDied(const wp<IBinder>& who); Loading include/gui/ConsumerBase.h +6 −3 Original line number Diff line number Diff line Loading @@ -101,11 +101,14 @@ protected: // 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 // must be called from the derived class. // BufferQueue. The onFrameAvailable and onBuffersReleased methods should // not need to be overridden by derived classes, but if they are overridden // the ConsumerBase implementation must be called from the derived class. // The ConsumerBase version of onSidebandStreamChanged does nothing and can // be overriden by derived classes if they want the notification. virtual void onFrameAvailable(); virtual void onBuffersReleased(); virtual void onSidebandStreamChanged(); // freeBufferLocked frees up the given buffer slot. If the slot has been // initialized this will release the reference to the GraphicBuffer in that Loading Loading
include/gui/BufferQueue.h +16 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,7 @@ public: virtual ~ProxyConsumerListener(); virtual void onFrameAvailable(); virtual void onBuffersReleased(); virtual void onSidebandStreamChanged(); private: // mConsumerListener is a weak reference to the IConsumerListener. This is // the raison d'etre of ProxyConsumerListener. Loading Loading @@ -253,6 +254,18 @@ public: // connected to the specified producer API. virtual status_t disconnect(int api); // Attaches a sideband buffer stream to the BufferQueue. // // A sideband stream is a device-specific mechanism for passing buffers // from the producer to the consumer without using dequeueBuffer/ // queueBuffer. If a sideband stream is present, the consumer can choose // whether to acquire buffers from the sideband stream or from the queued // buffers. // // Passing NULL or a different stream handle will detach the previous // handle if any. virtual status_t setSidebandStream(const sp<NativeHandle>& stream); /* * IGraphicBufferConsumer interface */ Loading Loading @@ -362,6 +375,9 @@ public: // NATIVE_WINDOW_TRANSFORM_ROT_90. The default is 0 (no transform). virtual status_t setTransformHint(uint32_t hint); // Retrieve the BufferQueue's sideband stream, if any. virtual sp<NativeHandle> getSidebandStream() const; // dump our state in a String virtual void dump(String8& result, const char* prefix) const; Loading
include/gui/BufferQueueConsumer.h +3 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,9 @@ public: // NATIVE_WINDOW_TRANSFORM_ROT_90. The default is 0 (no transform). virtual status_t setTransformHint(uint32_t hint); // Retrieve the sideband buffer stream, if any. virtual sp<NativeHandle> getSidebandStream() const; // dump our state in a String virtual void dump(String8& result, const char* prefix) const; Loading
include/gui/BufferQueueCore.h +4 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include <utils/Condition.h> #include <utils/Mutex.h> #include <utils/NativeHandle.h> #include <utils/RefBase.h> #include <utils/String8.h> #include <utils/StrongPointer.h> Loading Loading @@ -230,6 +231,9 @@ private: // mTransformHint is used to optimize for screen rotations. uint32_t mTransformHint; // mSidebandStream is a handle to the sideband buffer stream, if any sp<NativeHandle> mSidebandStream; }; // class BufferQueueCore } // namespace android Loading
include/gui/BufferQueueProducer.h +12 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,18 @@ public: // connected to the specified producer API. virtual status_t disconnect(int api); // Attaches a sideband buffer stream to the IGraphicBufferProducer. // // A sideband stream is a device-specific mechanism for passing buffers // from the producer to the consumer without using dequeueBuffer/ // queueBuffer. If a sideband stream is present, the consumer can choose // whether to acquire buffers from the sideband stream or from the queued // buffers. // // Passing NULL or a different stream handle will detach the previous // handle if any. virtual status_t setSidebandStream(const sp<NativeHandle>& stream); private: // This is required by the IBinder::DeathRecipient interface virtual void binderDied(const wp<IBinder>& who); Loading
include/gui/ConsumerBase.h +6 −3 Original line number Diff line number Diff line Loading @@ -101,11 +101,14 @@ protected: // 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 // must be called from the derived class. // BufferQueue. The onFrameAvailable and onBuffersReleased methods should // not need to be overridden by derived classes, but if they are overridden // the ConsumerBase implementation must be called from the derived class. // The ConsumerBase version of onSidebandStreamChanged does nothing and can // be overriden by derived classes if they want the notification. virtual void onFrameAvailable(); virtual void onBuffersReleased(); virtual void onSidebandStreamChanged(); // freeBufferLocked frees up the given buffer slot. If the slot has been // initialized this will release the reference to the GraphicBuffer in that Loading