summaryrefslogtreecommitdiffstats
path: root/include/gui/CpuConsumer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/gui/CpuConsumer.h')
-rw-r--r--include/gui/CpuConsumer.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/include/gui/CpuConsumer.h b/include/gui/CpuConsumer.h
index 4c6822a..c99ab29 100644
--- a/include/gui/CpuConsumer.h
+++ b/include/gui/CpuConsumer.h
@@ -53,6 +53,7 @@ class CpuConsumer : public ConsumerBase
uint32_t transform;
uint32_t scalingMode;
int64_t timestamp;
+ android_dataspace dataSpace;
uint64_t frameNumber;
// this is the same as format, except for formats that are compatible with
// a flexible format (e.g. HAL_PIXEL_FORMAT_YCbCr_420_888). In the latter
@@ -71,7 +72,7 @@ class CpuConsumer : public ConsumerBase
// Create a new CPU consumer. The maxLockedBuffers parameter specifies
// how many buffers can be locked for user access at the same time.
CpuConsumer(const sp<IGraphicBufferConsumer>& bq,
- uint32_t maxLockedBuffers, bool controlledByApp = false);
+ size_t maxLockedBuffers, bool controlledByApp = false);
virtual ~CpuConsumer();
@@ -86,10 +87,15 @@ class CpuConsumer : public ConsumerBase
status_t setDefaultBufferSize(uint32_t width, uint32_t height);
// setDefaultBufferFormat allows CpuConsumer's BufferQueue to create buffers
- // of a defaultFormat if no format is specified by producer. Formats are
- // enumerated in graphics.h; the initial default is
- // HAL_PIXEL_FORMAT_RGBA_8888.
- status_t setDefaultBufferFormat(uint32_t defaultFormat);
+ // of a defaultFormat if no format is specified by producer.
+ // The initial default is PIXEL_FORMAT_RGBA_8888.
+ 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);
// Gets the next graphics buffer from the producer and locks it for CPU use,
// filling out the passed-in locked buffer structure with the native pointer
@@ -110,9 +116,9 @@ class CpuConsumer : public ConsumerBase
private:
// Maximum number of buffers that can be locked at a time
- uint32_t mMaxLockedBuffers;
+ size_t mMaxLockedBuffers;
- status_t releaseAcquiredBufferLocked(int lockedIdx);
+ status_t releaseAcquiredBufferLocked(size_t lockedIdx);
virtual void freeBufferLocked(int slotIndex);
@@ -133,7 +139,7 @@ class CpuConsumer : public ConsumerBase
Vector<AcquiredBuffer> mAcquiredBuffers;
// Count of currently locked buffers
- uint32_t mCurrentLockedBuffers;
+ size_t mCurrentLockedBuffers;
};