Loading include/gui/BufferQueueCore.h +4 −0 Original line number Diff line number Diff line Loading @@ -266,6 +266,10 @@ private: // mIsAllocatingCondition is a condition variable used by producers to wait until mIsAllocating // becomes false. mutable Condition mIsAllocatingCondition; // mAllowAllocation determines whether dequeueBuffer is allowed to allocate // new buffers bool mAllowAllocation; }; // class BufferQueueCore } // namespace android Loading include/gui/BufferQueueProducer.h +3 −0 Original line number Diff line number Diff line Loading @@ -172,6 +172,9 @@ public: virtual void allocateBuffers(bool async, uint32_t width, uint32_t height, PixelFormat format, uint32_t usage); // See IGraphicBufferProducer::allowAllocation virtual status_t allowAllocation(bool allow); private: // This is required by the IBinder::DeathRecipient interface virtual void binderDied(const wp<IBinder>& who); Loading include/gui/IGraphicBufferProducer.h +12 −0 Original line number Diff line number Diff line Loading @@ -458,6 +458,18 @@ public: // allocated, this function has no effect. virtual void allocateBuffers(bool async, uint32_t width, uint32_t height, PixelFormat format, uint32_t usage) = 0; // Sets whether dequeueBuffer is allowed to allocate new buffers. // // Normally dequeueBuffer does not discriminate between free slots which // already have an allocated buffer and those which do not, and will // allocate a new buffer if the slot doesn't have a buffer or if the slot's // buffer doesn't match the requested size, format, or usage. This method // allows the producer to restrict the eligible slots to those which already // have an allocated buffer of the correct size, format, and usage. If no // eligible slot is available, dequeueBuffer will block or return an error // as usual. virtual status_t allowAllocation(bool allow) = 0; }; // ---------------------------------------------------------------------------- Loading include/ui/GraphicBuffer.h +3 −0 Original line number Diff line number Diff line Loading @@ -97,6 +97,9 @@ public: status_t reallocate(uint32_t inWidth, uint32_t inHeight, PixelFormat inFormat, uint32_t inUsage); bool needsReallocation(uint32_t inWidth, uint32_t inHeight, PixelFormat inFormat, uint32_t inUsage); status_t lock(uint32_t inUsage, void** vaddr); status_t lock(uint32_t inUsage, const Rect& rect, void** vaddr); // For HAL_PIXEL_FORMAT_YCbCr_420_888 Loading libs/gui/BufferQueueCore.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,8 @@ BufferQueueCore::BufferQueueCore(const sp<IGraphicBufferAlloc>& allocator) : mFrameCounter(0), mTransformHint(0), mIsAllocating(false), mIsAllocatingCondition() mIsAllocatingCondition(), mAllowAllocation(true) { if (allocator == NULL) { sp<ISurfaceComposer> composer(ComposerService::getComposerService()); Loading Loading
include/gui/BufferQueueCore.h +4 −0 Original line number Diff line number Diff line Loading @@ -266,6 +266,10 @@ private: // mIsAllocatingCondition is a condition variable used by producers to wait until mIsAllocating // becomes false. mutable Condition mIsAllocatingCondition; // mAllowAllocation determines whether dequeueBuffer is allowed to allocate // new buffers bool mAllowAllocation; }; // class BufferQueueCore } // namespace android Loading
include/gui/BufferQueueProducer.h +3 −0 Original line number Diff line number Diff line Loading @@ -172,6 +172,9 @@ public: virtual void allocateBuffers(bool async, uint32_t width, uint32_t height, PixelFormat format, uint32_t usage); // See IGraphicBufferProducer::allowAllocation virtual status_t allowAllocation(bool allow); private: // This is required by the IBinder::DeathRecipient interface virtual void binderDied(const wp<IBinder>& who); Loading
include/gui/IGraphicBufferProducer.h +12 −0 Original line number Diff line number Diff line Loading @@ -458,6 +458,18 @@ public: // allocated, this function has no effect. virtual void allocateBuffers(bool async, uint32_t width, uint32_t height, PixelFormat format, uint32_t usage) = 0; // Sets whether dequeueBuffer is allowed to allocate new buffers. // // Normally dequeueBuffer does not discriminate between free slots which // already have an allocated buffer and those which do not, and will // allocate a new buffer if the slot doesn't have a buffer or if the slot's // buffer doesn't match the requested size, format, or usage. This method // allows the producer to restrict the eligible slots to those which already // have an allocated buffer of the correct size, format, and usage. If no // eligible slot is available, dequeueBuffer will block or return an error // as usual. virtual status_t allowAllocation(bool allow) = 0; }; // ---------------------------------------------------------------------------- Loading
include/ui/GraphicBuffer.h +3 −0 Original line number Diff line number Diff line Loading @@ -97,6 +97,9 @@ public: status_t reallocate(uint32_t inWidth, uint32_t inHeight, PixelFormat inFormat, uint32_t inUsage); bool needsReallocation(uint32_t inWidth, uint32_t inHeight, PixelFormat inFormat, uint32_t inUsage); status_t lock(uint32_t inUsage, void** vaddr); status_t lock(uint32_t inUsage, const Rect& rect, void** vaddr); // For HAL_PIXEL_FORMAT_YCbCr_420_888 Loading
libs/gui/BufferQueueCore.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,8 @@ BufferQueueCore::BufferQueueCore(const sp<IGraphicBufferAlloc>& allocator) : mFrameCounter(0), mTransformHint(0), mIsAllocating(false), mIsAllocatingCondition() mIsAllocatingCondition(), mAllowAllocation(true) { if (allocator == NULL) { sp<ISurfaceComposer> composer(ComposerService::getComposerService()); Loading