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

Commit 9b8c084f authored by Guang Zhu's avatar Guang Zhu Committed by Android (Google) Code Review
Browse files

Merge "Revert "use 64-bits usage bits almost everywhere""

parents 9c2422bd 1671de00
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -121,12 +121,13 @@ 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(uint64_t usage) override;
    virtual status_t setConsumerUsageBits(uint32_t usage);

    // setConsumerIsProtected will turn on an internal bit that indicates whether
    // the consumer can handle protected gralloc buffers (i.e. with
+1 −1
Original line number Diff line number Diff line
@@ -170,7 +170,7 @@ private:

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

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

    // See IGraphicBufferProducer::allowAllocation
    virtual status_t allowAllocation(bool allow);
+1 −1
Original line number Diff line number Diff line
@@ -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(uint64_t usage) = 0;
    virtual status_t setConsumerUsageBits(uint32_t usage) = 0;

    // setConsumerIsProtected will turn on an internal bit that indicates whether
    // the consumer can handle protected gralloc buffers (i.e. with
+2 −2
Original line number Diff line number Diff line
@@ -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, uint64_t usage,
            uint32_t h, PixelFormat format, uint32_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, uint64_t usage) = 0;
            PixelFormat format, uint32_t usage) = 0;

    // Sets whether dequeueBuffer is allowed to allocate new buffers.
    //
Loading