Loading include/gui/BufferQueueCore.h +3 −0 Original line number Diff line number Diff line Loading @@ -319,6 +319,9 @@ private: android_dataspace dataspace; } mSharedBufferCache; // The slot of the last queued buffer int mLastQueuedSlot; }; // class BufferQueueCore } // namespace android Loading include/gui/BufferQueueProducer.h +4 −0 Original line number Diff line number Diff line Loading @@ -182,6 +182,10 @@ public: // See IGraphicBufferProducer::setDequeueTimeout virtual status_t setDequeueTimeout(nsecs_t timeout) override; // See IGraphicBufferProducer::getLastQueuedBuffer virtual status_t getLastQueuedBuffer(sp<GraphicBuffer>* outBuffer, sp<Fence>* outFence) override; private: // This is required by the IBinder::DeathRecipient interface virtual void binderDied(const wp<IBinder>& who); Loading include/gui/IGraphicBufferProducer.h +9 −0 Original line number Diff line number Diff line Loading @@ -557,6 +557,15 @@ public: // happen because of trying to allocate/deallocate the async // buffer. virtual status_t setDequeueTimeout(nsecs_t timeout) = 0; // Returns the last queued buffer along with a fence which must signal // before the contents of the buffer are read. If there are no buffers in // the queue, outBuffer will be populated with nullptr and outFence will be // populated with Fence::NO_FENCE // // Returns NO_ERROR or the status of the Binder transaction virtual status_t getLastQueuedBuffer(sp<GraphicBuffer>* outBuffer, sp<Fence>* outFence) = 0; }; // ---------------------------------------------------------------------------- Loading include/gui/Surface.h +4 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,10 @@ public: */ bool waitForNextFrame(uint64_t lastFrame, nsecs_t timeout); // See IGraphicBufferProducer::getLastQueuedBuffer status_t getLastQueuedBuffer(sp<GraphicBuffer>* outBuffer, sp<Fence>* outFence); protected: virtual ~Surface(); Loading libs/gui/BufferQueueCore.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -200,6 +200,10 @@ void BufferQueueCore::clearBufferSlotLocked(int slot) { } mSlots[slot].mFence = Fence::NO_FENCE; mSlots[slot].mEglDisplay = EGL_NO_DISPLAY; if (mLastQueuedSlot == slot) { mLastQueuedSlot = INVALID_BUFFER_SLOT; } } void BufferQueueCore::freeAllBuffersLocked() { Loading Loading
include/gui/BufferQueueCore.h +3 −0 Original line number Diff line number Diff line Loading @@ -319,6 +319,9 @@ private: android_dataspace dataspace; } mSharedBufferCache; // The slot of the last queued buffer int mLastQueuedSlot; }; // class BufferQueueCore } // namespace android Loading
include/gui/BufferQueueProducer.h +4 −0 Original line number Diff line number Diff line Loading @@ -182,6 +182,10 @@ public: // See IGraphicBufferProducer::setDequeueTimeout virtual status_t setDequeueTimeout(nsecs_t timeout) override; // See IGraphicBufferProducer::getLastQueuedBuffer virtual status_t getLastQueuedBuffer(sp<GraphicBuffer>* outBuffer, sp<Fence>* outFence) override; private: // This is required by the IBinder::DeathRecipient interface virtual void binderDied(const wp<IBinder>& who); Loading
include/gui/IGraphicBufferProducer.h +9 −0 Original line number Diff line number Diff line Loading @@ -557,6 +557,15 @@ public: // happen because of trying to allocate/deallocate the async // buffer. virtual status_t setDequeueTimeout(nsecs_t timeout) = 0; // Returns the last queued buffer along with a fence which must signal // before the contents of the buffer are read. If there are no buffers in // the queue, outBuffer will be populated with nullptr and outFence will be // populated with Fence::NO_FENCE // // Returns NO_ERROR or the status of the Binder transaction virtual status_t getLastQueuedBuffer(sp<GraphicBuffer>* outBuffer, sp<Fence>* outFence) = 0; }; // ---------------------------------------------------------------------------- Loading
include/gui/Surface.h +4 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,10 @@ public: */ bool waitForNextFrame(uint64_t lastFrame, nsecs_t timeout); // See IGraphicBufferProducer::getLastQueuedBuffer status_t getLastQueuedBuffer(sp<GraphicBuffer>* outBuffer, sp<Fence>* outFence); protected: virtual ~Surface(); Loading
libs/gui/BufferQueueCore.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -200,6 +200,10 @@ void BufferQueueCore::clearBufferSlotLocked(int slot) { } mSlots[slot].mFence = Fence::NO_FENCE; mSlots[slot].mEglDisplay = EGL_NO_DISPLAY; if (mLastQueuedSlot == slot) { mLastQueuedSlot = INVALID_BUFFER_SLOT; } } void BufferQueueCore::freeAllBuffersLocked() { Loading