diff options
author | Michael Lentine <mlentine@google.com> | 2015-05-18 13:41:23 -0700 |
---|---|---|
committer | Michael Lentine <mlentine@google.com> | 2015-05-18 14:29:18 -0700 |
commit | 847f11e215e86b107ab50c1359fc7bc3cd7a3a11 (patch) | |
tree | 06fcddbb9aab0e59b0622b590525635bc2ceadda /include/gui | |
parent | 00699fa64197cc72a160d69e1f0003cdd43dc136 (diff) | |
download | frameworks_native-847f11e215e86b107ab50c1359fc7bc3cd7a3a11.zip frameworks_native-847f11e215e86b107ab50c1359fc7bc3cd7a3a11.tar.gz frameworks_native-847f11e215e86b107ab50c1359fc7bc3cd7a3a11.tar.bz2 |
Refactor ConsumerBase and it's derived classes.
Move setDefaultBufferSize, setDefaultBufferFormat, and
setDefaultBufferDataSpace into ConsumerBase and remove them from
CpuConsumer and BufferItemConsumer.
Bug: 19977701
Change-Id: Ic68992464c5da6da7a41c4063a53029a69efcd1b
Diffstat (limited to 'include/gui')
-rw-r--r-- | include/gui/BufferItemConsumer.h | 15 | ||||
-rw-r--r-- | include/gui/ConsumerBase.h | 9 | ||||
-rw-r--r-- | include/gui/CpuConsumer.h | 17 |
3 files changed, 9 insertions, 32 deletions
diff --git a/include/gui/BufferItemConsumer.h b/include/gui/BufferItemConsumer.h index 930fabf..56c7a3f 100644 --- a/include/gui/BufferItemConsumer.h +++ b/include/gui/BufferItemConsumer.h @@ -86,21 +86,6 @@ class BufferItemConsumer: public ConsumerBase status_t releaseBuffer(const BufferItem &item, const sp<Fence>& releaseFence = Fence::NO_FENCE); - // setDefaultBufferSize is used to set the size of buffers returned by - // requestBuffers when a with and height of zero is requested. - status_t setDefaultBufferSize(uint32_t w, uint32_t h); - - // setDefaultBufferFormat allows the BufferQueue to create - // 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 diff --git a/include/gui/ConsumerBase.h b/include/gui/ConsumerBase.h index d56fa89..af46ba1 100644 --- a/include/gui/ConsumerBase.h +++ b/include/gui/ConsumerBase.h @@ -79,6 +79,15 @@ public: // See IGraphicBufferConsumer::detachBuffer status_t detachBuffer(int slot); + // See IGraphicBufferConsumer::setDefaultBufferSize + status_t setDefaultBufferSize(uint32_t width, uint32_t height); + + // See IGraphicBufferConsumer::setDefaultBufferFormat + status_t setDefaultBufferFormat(PixelFormat defaultFormat); + + // See IGraphicBufferConsumer::setDefaultBufferDataSpace + status_t setDefaultBufferDataSpace(android_dataspace defaultDataSpace); + private: ConsumerBase(const ConsumerBase&); void operator=(const ConsumerBase&); diff --git a/include/gui/CpuConsumer.h b/include/gui/CpuConsumer.h index c99ab29..3b07a31 100644 --- a/include/gui/CpuConsumer.h +++ b/include/gui/CpuConsumer.h @@ -80,23 +80,6 @@ class CpuConsumer : public ConsumerBase // log messages. void setName(const String8& name); - // setDefaultBufferSize is used to set the size of buffers returned by - // requestBuffers when a width and height of zero is requested. - // A call to setDefaultBufferSize() may trigger requestBuffers() to - // be called from the client. Default size is 1x1. - 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. - // 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 // and metadata. Returns BAD_VALUE if no new buffer is available, and |