diff options
| author | 2017-05-15 18:00:34 -0700 | |
|---|---|---|
| committer | 2017-05-19 14:39:55 -0700 | |
| commit | 175d98757d7d9003d4f64756cf4c2b366ba77e97 (patch) | |
| tree | 525b9df51a5ce2d0eb7d2bd1a2ed6730b283369b /include/gui | |
| parent | 5c865e5d25501f4edd2af960efbd28c3822b22db (diff) | |
use 64-bits usage bits almost everywhere
Test: manual, build
Bug: 33350696
Change-Id: Ida33c2a902155044651158467bb99d664e958c41
Diffstat (limited to 'include/gui')
| -rw-r--r-- | include/gui/BufferQueueConsumer.h | 5 | ||||
| -rw-r--r-- | include/gui/BufferQueueCore.h | 2 | ||||
| -rw-r--r-- | include/gui/BufferQueueProducer.h | 6 | ||||
| -rw-r--r-- | include/gui/IGraphicBufferConsumer.h | 2 | ||||
| -rw-r--r-- | include/gui/IGraphicBufferProducer.h | 4 | ||||
| -rw-r--r-- | include/gui/Surface.h | 6 | ||||
| -rw-r--r-- | include/gui/bufferqueue/1.0/H2BGraphicBufferProducer.h | 4 |
7 files changed, 14 insertions, 15 deletions
diff --git a/include/gui/BufferQueueConsumer.h b/include/gui/BufferQueueConsumer.h index f194bdf758..d108120777 100644 --- a/include/gui/BufferQueueConsumer.h +++ b/include/gui/BufferQueueConsumer.h @@ -121,13 +121,12 @@ public: // 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); + 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. - virtual status_t setConsumerUsageBits(uint32_t usage); + virtual status_t setConsumerUsageBits(uint64_t usage) override; // setConsumerIsProtected will turn on an internal bit that indicates whether // the consumer can handle protected gralloc buffers (i.e. with diff --git a/include/gui/BufferQueueCore.h b/include/gui/BufferQueueCore.h index dd8b992ce1..537c957746 100644 --- a/include/gui/BufferQueueCore.h +++ b/include/gui/BufferQueueCore.h @@ -170,7 +170,7 @@ private: // mConsumerUsageBits contains flags that the consumer wants for // GraphicBuffers. - uint32_t mConsumerUsageBits; + uint64_t mConsumerUsageBits; // mConsumerIsProtected indicates the consumer is ready to handle protected // buffer. diff --git a/include/gui/BufferQueueProducer.h b/include/gui/BufferQueueProducer.h index 87bc8008e1..0f8917aa6d 100644 --- a/include/gui/BufferQueueProducer.h +++ b/include/gui/BufferQueueProducer.h @@ -80,9 +80,9 @@ public: // // In both cases, the producer will need to call requestBuffer to get a // GraphicBuffer handle for the returned slot. - status_t dequeueBuffer(int *outSlot, sp<Fence>* outFence, + virtual status_t dequeueBuffer(int *outSlot, sp<Fence>* outFence, uint32_t width, uint32_t height, PixelFormat format, - uint32_t usage, FrameEventHistoryDelta* outTimestamps) override; + uint64_t usage, FrameEventHistoryDelta* outTimestamps) override; // See IGraphicBufferProducer::detachBuffer virtual status_t detachBuffer(int slot); @@ -152,7 +152,7 @@ public: // See IGraphicBufferProducer::allocateBuffers virtual void allocateBuffers(uint32_t width, uint32_t height, - PixelFormat format, uint32_t usage); + PixelFormat format, uint64_t usage) override; // See IGraphicBufferProducer::allowAllocation virtual status_t allowAllocation(bool allow); diff --git a/include/gui/IGraphicBufferConsumer.h b/include/gui/IGraphicBufferConsumer.h index 57cce16d10..90de1140e9 100644 --- a/include/gui/IGraphicBufferConsumer.h +++ b/include/gui/IGraphicBufferConsumer.h @@ -241,7 +241,7 @@ public: // e.g. GRALLOC_USAGE_HW_RENDER; the default is 0. // // Return of a value other than NO_ERROR means an unknown error has occurred. - virtual status_t setConsumerUsageBits(uint32_t usage) = 0; + virtual status_t setConsumerUsageBits(uint64_t usage) = 0; // setConsumerIsProtected will turn on an internal bit that indicates whether // the consumer can handle protected gralloc buffers (i.e. with diff --git a/include/gui/IGraphicBufferProducer.h b/include/gui/IGraphicBufferProducer.h index 925080663e..6d16e7426c 100644 --- a/include/gui/IGraphicBufferProducer.h +++ b/include/gui/IGraphicBufferProducer.h @@ -195,7 +195,7 @@ public: // All other negative values are an unknown error returned downstream // from the graphics allocator (typically errno). virtual status_t dequeueBuffer(int* slot, sp<Fence>* fence, uint32_t w, - uint32_t h, PixelFormat format, uint32_t usage, + uint32_t h, PixelFormat format, uint64_t usage, FrameEventHistoryDelta* outTimestamps) = 0; // detachBuffer attempts to remove all ownership of the buffer in the given @@ -517,7 +517,7 @@ public: // dequeueBuffer. If there are already the maximum number of buffers // allocated, this function has no effect. virtual void allocateBuffers(uint32_t width, uint32_t height, - PixelFormat format, uint32_t usage) = 0; + PixelFormat format, uint64_t usage) = 0; // Sets whether dequeueBuffer is allowed to allocate new buffers. // diff --git a/include/gui/Surface.h b/include/gui/Surface.h index c8c6e99c10..c836543b16 100644 --- a/include/gui/Surface.h +++ b/include/gui/Surface.h @@ -204,8 +204,8 @@ private: int dispatchSetBuffersStickyTransform(va_list args); int dispatchSetBuffersTimestamp(va_list args); int dispatchSetCrop(va_list args); - int dispatchSetPostTransformCrop(va_list args); int dispatchSetUsage(va_list args); + int dispatchSetUsage64(va_list args); int dispatchLock(va_list args); int dispatchUnlockAndPost(va_list args); int dispatchSetSidebandStream(va_list args); @@ -239,7 +239,7 @@ protected: virtual int setBuffersTimestamp(int64_t timestamp); virtual int setBuffersDataSpace(android_dataspace dataSpace); virtual int setCrop(Rect const* rect); - virtual int setUsage(uint32_t reqUsage); + virtual int setUsage(uint64_t reqUsage); virtual void setSurfaceDamage(android_native_rect_t* rects, size_t numRects); public: @@ -318,7 +318,7 @@ protected: // mReqUsage is the set of buffer usage flags that will be requested // at the next deuque operation. It is initialized to 0. - uint32_t mReqUsage; + uint64_t mReqUsage; // mTimestamp is the timestamp that will be used for the next buffer queue // operation. It defaults to NATIVE_WINDOW_TIMESTAMP_AUTO, which means that diff --git a/include/gui/bufferqueue/1.0/H2BGraphicBufferProducer.h b/include/gui/bufferqueue/1.0/H2BGraphicBufferProducer.h index 93c452a0d6..c3a9d443ec 100644 --- a/include/gui/bufferqueue/1.0/H2BGraphicBufferProducer.h +++ b/include/gui/bufferqueue/1.0/H2BGraphicBufferProducer.h @@ -65,7 +65,7 @@ struct H2BGraphicBufferProducer : public ::android::H2BConverter< status_t setMaxDequeuedBufferCount(int maxDequeuedBuffers) override; status_t setAsyncMode(bool async) override; status_t dequeueBuffer(int* slot, sp<Fence>* fence, uint32_t w, - uint32_t h, ::android::PixelFormat format, uint32_t usage, + uint32_t h, ::android::PixelFormat format, uint64_t usage, FrameEventHistoryDelta* outTimestamps) override; status_t detachBuffer(int slot) override; status_t detachNextBuffer(sp<GraphicBuffer>* outBuffer, sp<Fence>* outFence) @@ -83,7 +83,7 @@ struct H2BGraphicBufferProducer : public ::android::H2BConverter< override; status_t setSidebandStream(const sp<NativeHandle>& stream) override; void allocateBuffers(uint32_t width, uint32_t height, - ::android::PixelFormat format, uint32_t usage) override; + ::android::PixelFormat format, uint64_t usage) override; status_t allowAllocation(bool allow) override; status_t setGenerationNumber(uint32_t generationNumber) override; String8 getConsumerName() const override; |