diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/gui/CpuConsumer.h | 8 | ||||
-rw-r--r-- | include/ui/GraphicBuffer.h | 3 | ||||
-rw-r--r-- | include/ui/GraphicBufferMapper.h | 3 |
3 files changed, 14 insertions, 0 deletions
diff --git a/include/gui/CpuConsumer.h b/include/gui/CpuConsumer.h index 4b956c7..bf9918e 100644 --- a/include/gui/CpuConsumer.h +++ b/include/gui/CpuConsumer.h @@ -53,6 +53,14 @@ class CpuConsumer : public ConsumerBase uint32_t scalingMode; int64_t timestamp; uint64_t frameNumber; + // Values below are only valid when using + // HAL_PIXEL_FORMAT_YCbCr_420_888, in which case LockedBuffer::data + // contains the Y channel, and stride is the Y channel stride. For other + // formats, these will all be 0. + uint8_t *dataCb; + uint8_t *dataCr; + uint32_t chromaStride; + uint32_t chromaStep; }; // Create a new CPU consumer. The maxLockedBuffers parameter specifies diff --git a/include/ui/GraphicBuffer.h b/include/ui/GraphicBuffer.h index ea9368d..e5ad1e0 100644 --- a/include/ui/GraphicBuffer.h +++ b/include/ui/GraphicBuffer.h @@ -92,6 +92,9 @@ public: status_t lock(uint32_t usage, void** vaddr); status_t lock(uint32_t usage, const Rect& rect, void** vaddr); + // For HAL_PIXEL_FORMAT_YCbCr_420_888 + status_t lockYCbCr(uint32_t usage, android_ycbcr *ycbcr); + status_t lockYCbCr(uint32_t usage, const Rect& rect, android_ycbcr *ycbcr); status_t unlock(); ANativeWindowBuffer* getNativeBuffer() const; diff --git a/include/ui/GraphicBufferMapper.h b/include/ui/GraphicBufferMapper.h index 697a02a..99d8723 100644 --- a/include/ui/GraphicBufferMapper.h +++ b/include/ui/GraphicBufferMapper.h @@ -45,6 +45,9 @@ public: status_t lock(buffer_handle_t handle, int usage, const Rect& bounds, void** vaddr); + status_t lockYCbCr(buffer_handle_t handle, + int usage, const Rect& bounds, android_ycbcr *ycbcr); + status_t unlock(buffer_handle_t handle); // dumps information about the mapping of this handle |