Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aed1910c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "use 64-bits usage bits almost everywhere"

parents aeae88f9 175d9875
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -121,13 +121,12 @@ public:
    // GraphicBuffers of a defaultDataSpace if no data space is specified
    // GraphicBuffers of a defaultDataSpace if no data space is specified
    // in queueBuffer.
    // in queueBuffer.
    // The initial default is HAL_DATASPACE_UNKNOWN
    // The initial default is HAL_DATASPACE_UNKNOWN
    virtual status_t setDefaultBufferDataSpace(
    virtual status_t setDefaultBufferDataSpace(android_dataspace defaultDataSpace);
            android_dataspace defaultDataSpace);


    // setConsumerUsageBits will turn on additional usage bits for dequeueBuffer.
    // setConsumerUsageBits will turn on additional usage bits for dequeueBuffer.
    // These are merged with the bits passed to dequeueBuffer.  The values are
    // 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.
    // 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
    // setConsumerIsProtected will turn on an internal bit that indicates whether
    // the consumer can handle protected gralloc buffers (i.e. with
    // the consumer can handle protected gralloc buffers (i.e. with
+1 −1
Original line number Original line Diff line number Diff line
@@ -170,7 +170,7 @@ private:


    // mConsumerUsageBits contains flags that the consumer wants for
    // mConsumerUsageBits contains flags that the consumer wants for
    // GraphicBuffers.
    // GraphicBuffers.
    uint32_t mConsumerUsageBits;
    uint64_t mConsumerUsageBits;


    // mConsumerIsProtected indicates the consumer is ready to handle protected
    // mConsumerIsProtected indicates the consumer is ready to handle protected
    // buffer.
    // buffer.
+3 −3
Original line number Original line Diff line number Diff line
@@ -80,9 +80,9 @@ public:
    //
    //
    // In both cases, the producer will need to call requestBuffer to get a
    // In both cases, the producer will need to call requestBuffer to get a
    // GraphicBuffer handle for the returned slot.
    // 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 width, uint32_t height, PixelFormat format,
            uint32_t usage, FrameEventHistoryDelta* outTimestamps) override;
            uint64_t usage, FrameEventHistoryDelta* outTimestamps) override;


    // See IGraphicBufferProducer::detachBuffer
    // See IGraphicBufferProducer::detachBuffer
    virtual status_t detachBuffer(int slot);
    virtual status_t detachBuffer(int slot);
@@ -152,7 +152,7 @@ public:


    // See IGraphicBufferProducer::allocateBuffers
    // See IGraphicBufferProducer::allocateBuffers
    virtual void allocateBuffers(uint32_t width, uint32_t height,
    virtual void allocateBuffers(uint32_t width, uint32_t height,
            PixelFormat format, uint32_t usage);
            PixelFormat format, uint64_t usage) override;


    // See IGraphicBufferProducer::allowAllocation
    // See IGraphicBufferProducer::allowAllocation
    virtual status_t allowAllocation(bool allow);
    virtual status_t allowAllocation(bool allow);
+1 −1
Original line number Original line Diff line number Diff line
@@ -241,7 +241,7 @@ public:
    // e.g. GRALLOC_USAGE_HW_RENDER; the default is 0.
    // e.g. GRALLOC_USAGE_HW_RENDER; the default is 0.
    //
    //
    // Return of a value other than NO_ERROR means an unknown error has occurred.
    // 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
    // setConsumerIsProtected will turn on an internal bit that indicates whether
    // the consumer can handle protected gralloc buffers (i.e. with
    // the consumer can handle protected gralloc buffers (i.e. with
+2 −2
Original line number Original line Diff line number Diff line
@@ -195,7 +195,7 @@ public:
    // All other negative values are an unknown error returned downstream
    // All other negative values are an unknown error returned downstream
    // from the graphics allocator (typically errno).
    // from the graphics allocator (typically errno).
    virtual status_t dequeueBuffer(int* slot, sp<Fence>* fence, uint32_t w,
    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;
            FrameEventHistoryDelta* outTimestamps) = 0;


    // detachBuffer attempts to remove all ownership of the buffer in the given
    // 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
    // dequeueBuffer. If there are already the maximum number of buffers
    // allocated, this function has no effect.
    // allocated, this function has no effect.
    virtual void allocateBuffers(uint32_t width, uint32_t height,
    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.
    // Sets whether dequeueBuffer is allowed to allocate new buffers.
    //
    //
Loading