Loading include/gui/BufferQueueCore.h +5 −0 Original line number Original line Diff line number Diff line Loading @@ -275,6 +275,11 @@ private: // buffer as the number of frames that have elapsed since it was last queued // buffer as the number of frames that have elapsed since it was last queued uint64_t mBufferAge; uint64_t mBufferAge; // mGenerationNumber stores the current generation number of the attached // producer. Any attempt to attach a buffer with a different generation // number will fail. uint32_t mGenerationNumber; }; // class BufferQueueCore }; // class BufferQueueCore } // namespace android } // namespace android Loading include/gui/BufferQueueProducer.h +3 −0 Original line number Original line Diff line number Diff line Loading @@ -175,6 +175,9 @@ public: // See IGraphicBufferProducer::allowAllocation // See IGraphicBufferProducer::allowAllocation virtual status_t allowAllocation(bool allow); virtual status_t allowAllocation(bool allow); // See IGraphicBufferProducer::setGenerationNumber virtual status_t setGenerationNumber(uint32_t generationNumber); private: private: // This is required by the IBinder::DeathRecipient interface // This is required by the IBinder::DeathRecipient interface virtual void binderDied(const wp<IBinder>& who); virtual void binderDied(const wp<IBinder>& who); Loading include/gui/IGraphicBufferConsumer.h +2 −1 Original line number Original line Diff line number Diff line Loading @@ -110,7 +110,8 @@ public: // will be deallocated as stale. // will be deallocated as stale. // // // Return of a value other than NO_ERROR means an error has occurred: // Return of a value other than NO_ERROR means an error has occurred: // * BAD_VALUE - outSlot or buffer were NULL // * BAD_VALUE - outSlot or buffer were NULL, or the generation number of // the buffer did not match the buffer queue. // * INVALID_OPERATION - cannot attach the buffer because it would cause too // * INVALID_OPERATION - cannot attach the buffer because it would cause too // many buffers to be acquired. // many buffers to be acquired. // * NO_MEMORY - no free slots available // * NO_MEMORY - no free slots available Loading include/gui/IGraphicBufferProducer.h +12 −2 Original line number Original line Diff line number Diff line Loading @@ -218,8 +218,9 @@ public: // // // Return of a negative value means an error has occurred: // Return of a negative value means an error has occurred: // * NO_INIT - the buffer queue has been abandoned. // * NO_INIT - the buffer queue has been abandoned. // * BAD_VALUE - outSlot or buffer were NULL or invalid combination of // * BAD_VALUE - outSlot or buffer were NULL, invalid combination of // async mode and buffer count override. // async mode and buffer count override, or the generation // number of the buffer did not match the buffer queue. // * INVALID_OPERATION - cannot attach the buffer because it would cause // * INVALID_OPERATION - cannot attach the buffer because it would cause // too many buffers to be dequeued, either because // too many buffers to be dequeued, either because // the producer already has a single buffer dequeued // the producer already has a single buffer dequeued Loading Loading @@ -470,6 +471,15 @@ public: // eligible slot is available, dequeueBuffer will block or return an error // eligible slot is available, dequeueBuffer will block or return an error // as usual. // as usual. virtual status_t allowAllocation(bool allow) = 0; virtual status_t allowAllocation(bool allow) = 0; // Sets the current generation number of the BufferQueue. // // This generation number will be inserted into any buffers allocated by the // BufferQueue, and any attempts to attach a buffer with a different // generation number will fail. Buffers already in the queue are not // affected and will retain their current generation number. The generation // number defaults to 0. virtual status_t setGenerationNumber(uint32_t generationNumber) = 0; }; }; // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- Loading include/gui/Surface.h +9 −0 Original line number Original line Diff line number Diff line Loading @@ -101,6 +101,11 @@ public: */ */ void allocateBuffers(); void allocateBuffers(); /* Sets the generation number on the IGraphicBufferProducer and updates the * generation number on any buffers attached to the Surface after this call. * See IGBP::setGenerationNumber for more information. */ status_t setGenerationNumber(uint32_t generationNumber); protected: protected: virtual ~Surface(); virtual ~Surface(); Loading Loading @@ -305,6 +310,10 @@ private: // When a non-CPU producer is attached, this reflects the surface damage // When a non-CPU producer is attached, this reflects the surface damage // (the change since the previous frame) passed in by the producer. // (the change since the previous frame) passed in by the producer. Region mDirtyRegion; Region mDirtyRegion; // Stores the current generation number. See setGenerationNumber and // IGraphicBufferProducer::setGenerationNumber for more information. uint32_t mGenerationNumber; }; }; }; // namespace android }; // namespace android Loading Loading
include/gui/BufferQueueCore.h +5 −0 Original line number Original line Diff line number Diff line Loading @@ -275,6 +275,11 @@ private: // buffer as the number of frames that have elapsed since it was last queued // buffer as the number of frames that have elapsed since it was last queued uint64_t mBufferAge; uint64_t mBufferAge; // mGenerationNumber stores the current generation number of the attached // producer. Any attempt to attach a buffer with a different generation // number will fail. uint32_t mGenerationNumber; }; // class BufferQueueCore }; // class BufferQueueCore } // namespace android } // namespace android Loading
include/gui/BufferQueueProducer.h +3 −0 Original line number Original line Diff line number Diff line Loading @@ -175,6 +175,9 @@ public: // See IGraphicBufferProducer::allowAllocation // See IGraphicBufferProducer::allowAllocation virtual status_t allowAllocation(bool allow); virtual status_t allowAllocation(bool allow); // See IGraphicBufferProducer::setGenerationNumber virtual status_t setGenerationNumber(uint32_t generationNumber); private: private: // This is required by the IBinder::DeathRecipient interface // This is required by the IBinder::DeathRecipient interface virtual void binderDied(const wp<IBinder>& who); virtual void binderDied(const wp<IBinder>& who); Loading
include/gui/IGraphicBufferConsumer.h +2 −1 Original line number Original line Diff line number Diff line Loading @@ -110,7 +110,8 @@ public: // will be deallocated as stale. // will be deallocated as stale. // // // Return of a value other than NO_ERROR means an error has occurred: // Return of a value other than NO_ERROR means an error has occurred: // * BAD_VALUE - outSlot or buffer were NULL // * BAD_VALUE - outSlot or buffer were NULL, or the generation number of // the buffer did not match the buffer queue. // * INVALID_OPERATION - cannot attach the buffer because it would cause too // * INVALID_OPERATION - cannot attach the buffer because it would cause too // many buffers to be acquired. // many buffers to be acquired. // * NO_MEMORY - no free slots available // * NO_MEMORY - no free slots available Loading
include/gui/IGraphicBufferProducer.h +12 −2 Original line number Original line Diff line number Diff line Loading @@ -218,8 +218,9 @@ public: // // // Return of a negative value means an error has occurred: // Return of a negative value means an error has occurred: // * NO_INIT - the buffer queue has been abandoned. // * NO_INIT - the buffer queue has been abandoned. // * BAD_VALUE - outSlot or buffer were NULL or invalid combination of // * BAD_VALUE - outSlot or buffer were NULL, invalid combination of // async mode and buffer count override. // async mode and buffer count override, or the generation // number of the buffer did not match the buffer queue. // * INVALID_OPERATION - cannot attach the buffer because it would cause // * INVALID_OPERATION - cannot attach the buffer because it would cause // too many buffers to be dequeued, either because // too many buffers to be dequeued, either because // the producer already has a single buffer dequeued // the producer already has a single buffer dequeued Loading Loading @@ -470,6 +471,15 @@ public: // eligible slot is available, dequeueBuffer will block or return an error // eligible slot is available, dequeueBuffer will block or return an error // as usual. // as usual. virtual status_t allowAllocation(bool allow) = 0; virtual status_t allowAllocation(bool allow) = 0; // Sets the current generation number of the BufferQueue. // // This generation number will be inserted into any buffers allocated by the // BufferQueue, and any attempts to attach a buffer with a different // generation number will fail. Buffers already in the queue are not // affected and will retain their current generation number. The generation // number defaults to 0. virtual status_t setGenerationNumber(uint32_t generationNumber) = 0; }; }; // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- Loading
include/gui/Surface.h +9 −0 Original line number Original line Diff line number Diff line Loading @@ -101,6 +101,11 @@ public: */ */ void allocateBuffers(); void allocateBuffers(); /* Sets the generation number on the IGraphicBufferProducer and updates the * generation number on any buffers attached to the Surface after this call. * See IGBP::setGenerationNumber for more information. */ status_t setGenerationNumber(uint32_t generationNumber); protected: protected: virtual ~Surface(); virtual ~Surface(); Loading Loading @@ -305,6 +310,10 @@ private: // When a non-CPU producer is attached, this reflects the surface damage // When a non-CPU producer is attached, this reflects the surface damage // (the change since the previous frame) passed in by the producer. // (the change since the previous frame) passed in by the producer. Region mDirtyRegion; Region mDirtyRegion; // Stores the current generation number. See setGenerationNumber and // IGraphicBufferProducer::setGenerationNumber for more information. uint32_t mGenerationNumber; }; }; }; // namespace android }; // namespace android Loading