Loading include/gui/BufferItem.h +13 −2 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ class BufferItem : public Flattenable<BufferItem> { // The default value of mBuf, used to indicate this doesn't correspond to a slot. enum { INVALID_BUFFER_SLOT = -1 }; BufferItem(); BufferItem(const IGraphicBufferConsumer::BufferItem& item); ~BufferItem(); operator IGraphicBufferConsumer::BufferItem() const; Loading Loading @@ -78,12 +79,22 @@ class BufferItem : public Flattenable<BufferItem> { // automatically when the buffer was queued. bool mIsAutoTimestamp; // mDataSpace is the current dataSpace value for this buffer slot. This gets // set by queueBuffer each time this slot is queued. The meaning of the // dataSpace is format-dependent. android_dataspace mDataSpace; // mFrameNumber is the number of the queued frame for this slot. uint64_t mFrameNumber; union { // mSlot is the slot index of this buffer (default INVALID_BUFFER_SLOT). int mSlot; // mBuf is the former name for mSlot int mBuf; }; // mIsDroppable whether this buffer was queued with the // property that it can be replaced by a new buffer for the purpose of // making sure dequeueBuffer() won't block. Loading include/gui/BufferItemConsumer.h +11 −2 Original line number Diff line number Diff line Loading @@ -76,7 +76,9 @@ class BufferItemConsumer: public ConsumerBase // // If waitForFence is true, and the acquired BufferItem has a valid fence object, // acquireBuffer will wait on the fence with no timeout before returning. status_t acquireBuffer(BufferItem *item, nsecs_t presentWhen, status_t acquireBuffer(BufferQueue::BufferItem *item, nsecs_t presentWhen, bool waitForFence = true); status_t acquireBuffer(android::BufferItem* item, nsecs_t presentWhen, bool waitForFence = true); // Returns an acquired buffer to the queue, allowing it to be reused. Since Loading @@ -96,6 +98,13 @@ class BufferItemConsumer: public ConsumerBase // GraphicBuffers of a defaultFormat if no format is specified // in dequeueBuffer status_t setDefaultBufferFormat(PixelFormat defaultFormat); // setDefaultBufferDataSpace allows the BufferQueue to create // GraphicBuffers of a defaultDataSpace if no data space is specified // in queueBuffer. // The initial default is HAL_DATASPACE_UNKNOWN status_t setDefaultBufferDataSpace(android_dataspace defaultDataSpace); }; } // namespace android Loading include/gui/BufferQueueConsumer.h +9 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,8 @@ public: // is CLOCK_MONOTONIC. virtual status_t acquireBuffer(BufferItem* outBuffer, nsecs_t expectedPresent); virtual status_t acquireBuffer(android::BufferItem* outBuffer, nsecs_t expectedPresent); // See IGraphicBufferConsumer::detachBuffer virtual status_t detachBuffer(int slot); Loading Loading @@ -128,6 +130,13 @@ public: // in dequeueBuffer. The initial default is HAL_PIXEL_FORMAT_RGBA_8888. virtual status_t setDefaultBufferFormat(PixelFormat defaultFormat); // setDefaultBufferDataSpace allows the BufferQueue to create // GraphicBuffers of a defaultDataSpace if no data space is specified // in queueBuffer. // The initial default is HAL_DATASPACE_UNKNOWN virtual status_t setDefaultBufferDataSpace( android_dataspace defaultDataSpace); // setConsumerUsageBits will turn on additional usage bits for dequeueBuffer. // These are merged with the bits passed to dequeueBuffer. The values are // enumerated in gralloc.h, e.g. GRALLOC_USAGE_HW_RENDER; the default is 0. Loading include/gui/BufferQueueCore.h +5 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,11 @@ private: // in dequeueBuffer if a width and height of 0 are specified. uint32_t mDefaultHeight; // mDefaultBufferDataSpace holds the default dataSpace of queued buffers. // It is used in queueBuffer if a dataspace of 0 (HAL_DATASPACE_UNKNOWN) // is specified. android_dataspace mDefaultBufferDataSpace; // mDefaultMaxBufferCount is the default limit on the number of buffers that // will be allocated at one time. This default limit is set by the consumer. // The limit (as opposed to the default limit) may be overriden by the Loading include/gui/ConsumerBase.h +2 −2 Original line number Diff line number Diff line Loading @@ -153,8 +153,8 @@ 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(IGraphicBufferConsumer::BufferItem *item, nsecs_t presentWhen); virtual status_t acquireBufferLocked(BufferItem *item, nsecs_t presentWhen); virtual status_t acquireBufferLocked(BufferQueue::BufferItem *item, nsecs_t presentWhen); // releaseBufferLocked relinquishes control over a buffer, returning that // control to the BufferQueue. Loading Loading
include/gui/BufferItem.h +13 −2 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ class BufferItem : public Flattenable<BufferItem> { // The default value of mBuf, used to indicate this doesn't correspond to a slot. enum { INVALID_BUFFER_SLOT = -1 }; BufferItem(); BufferItem(const IGraphicBufferConsumer::BufferItem& item); ~BufferItem(); operator IGraphicBufferConsumer::BufferItem() const; Loading Loading @@ -78,12 +79,22 @@ class BufferItem : public Flattenable<BufferItem> { // automatically when the buffer was queued. bool mIsAutoTimestamp; // mDataSpace is the current dataSpace value for this buffer slot. This gets // set by queueBuffer each time this slot is queued. The meaning of the // dataSpace is format-dependent. android_dataspace mDataSpace; // mFrameNumber is the number of the queued frame for this slot. uint64_t mFrameNumber; union { // mSlot is the slot index of this buffer (default INVALID_BUFFER_SLOT). int mSlot; // mBuf is the former name for mSlot int mBuf; }; // mIsDroppable whether this buffer was queued with the // property that it can be replaced by a new buffer for the purpose of // making sure dequeueBuffer() won't block. Loading
include/gui/BufferItemConsumer.h +11 −2 Original line number Diff line number Diff line Loading @@ -76,7 +76,9 @@ class BufferItemConsumer: public ConsumerBase // // If waitForFence is true, and the acquired BufferItem has a valid fence object, // acquireBuffer will wait on the fence with no timeout before returning. status_t acquireBuffer(BufferItem *item, nsecs_t presentWhen, status_t acquireBuffer(BufferQueue::BufferItem *item, nsecs_t presentWhen, bool waitForFence = true); status_t acquireBuffer(android::BufferItem* item, nsecs_t presentWhen, bool waitForFence = true); // Returns an acquired buffer to the queue, allowing it to be reused. Since Loading @@ -96,6 +98,13 @@ class BufferItemConsumer: public ConsumerBase // GraphicBuffers of a defaultFormat if no format is specified // in dequeueBuffer status_t setDefaultBufferFormat(PixelFormat defaultFormat); // setDefaultBufferDataSpace allows the BufferQueue to create // GraphicBuffers of a defaultDataSpace if no data space is specified // in queueBuffer. // The initial default is HAL_DATASPACE_UNKNOWN status_t setDefaultBufferDataSpace(android_dataspace defaultDataSpace); }; } // namespace android Loading
include/gui/BufferQueueConsumer.h +9 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,8 @@ public: // is CLOCK_MONOTONIC. virtual status_t acquireBuffer(BufferItem* outBuffer, nsecs_t expectedPresent); virtual status_t acquireBuffer(android::BufferItem* outBuffer, nsecs_t expectedPresent); // See IGraphicBufferConsumer::detachBuffer virtual status_t detachBuffer(int slot); Loading Loading @@ -128,6 +130,13 @@ public: // in dequeueBuffer. The initial default is HAL_PIXEL_FORMAT_RGBA_8888. virtual status_t setDefaultBufferFormat(PixelFormat defaultFormat); // setDefaultBufferDataSpace allows the BufferQueue to create // GraphicBuffers of a defaultDataSpace if no data space is specified // in queueBuffer. // The initial default is HAL_DATASPACE_UNKNOWN virtual status_t setDefaultBufferDataSpace( android_dataspace defaultDataSpace); // setConsumerUsageBits will turn on additional usage bits for dequeueBuffer. // These are merged with the bits passed to dequeueBuffer. The values are // enumerated in gralloc.h, e.g. GRALLOC_USAGE_HW_RENDER; the default is 0. Loading
include/gui/BufferQueueCore.h +5 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,11 @@ private: // in dequeueBuffer if a width and height of 0 are specified. uint32_t mDefaultHeight; // mDefaultBufferDataSpace holds the default dataSpace of queued buffers. // It is used in queueBuffer if a dataspace of 0 (HAL_DATASPACE_UNKNOWN) // is specified. android_dataspace mDefaultBufferDataSpace; // mDefaultMaxBufferCount is the default limit on the number of buffers that // will be allocated at one time. This default limit is set by the consumer. // The limit (as opposed to the default limit) may be overriden by the Loading
include/gui/ConsumerBase.h +2 −2 Original line number Diff line number Diff line Loading @@ -153,8 +153,8 @@ 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(IGraphicBufferConsumer::BufferItem *item, nsecs_t presentWhen); virtual status_t acquireBufferLocked(BufferItem *item, nsecs_t presentWhen); virtual status_t acquireBufferLocked(BufferQueue::BufferItem *item, nsecs_t presentWhen); // releaseBufferLocked relinquishes control over a buffer, returning that // control to the BufferQueue. Loading