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

Commit febd4f4f authored by Dan Stoza's avatar Dan Stoza
Browse files

BufferQueue: Increase max slots from 32 to 64

Increases NUM_BUFFER_SLOTS from 32 to 64 and changes the mask
returned by IGBC::getReleasedBuffers from 32 to 64 bits.

Bug: 13174352
Change-Id: Ie8ef0853916cfb91f83881c7241886bb1950f01a
parent 10f91bbf
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ class BufferQueue : public BQProducer,
public:
    // BufferQueue will keep track of at most this value of buffers.
    // Attempts at runtime to increase the number of buffers past this will fail.
    enum { NUM_BUFFER_SLOTS = 32 };
    enum { NUM_BUFFER_SLOTS = BufferQueueDefs::NUM_BUFFER_SLOTS };
    // Used as a placeholder slot# when the value isn't pointing to an existing buffer.
    enum { INVALID_BUFFER_SLOT = IGraphicBufferConsumer::BufferItem::INVALID_BUFFER_SLOT };
    // Alias to <IGraphicBufferConsumer.h> -- please scope from there in future code!
@@ -325,7 +325,7 @@ public:
    // but have not yet been released by the consumer.
    //
    // This should be called from the onBuffersReleased() callback.
    virtual status_t getReleasedBuffers(uint32_t* slotMask);
    virtual status_t getReleasedBuffers(uint64_t* slotMask);

    // setDefaultBufferSize is used to set the size of buffers returned by
    // dequeueBuffer when a width and height of zero is requested.  Default
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ public:
    // but have not yet been released by the consumer.
    //
    // This should be called from the onBuffersReleased() callback.
    virtual status_t getReleasedBuffers(uint32_t* outSlotMask);
    virtual status_t getReleasedBuffers(uint64_t* outSlotMask);

    // setDefaultBufferSize is used to set the size of buffers returned by
    // dequeueBuffer when a width and height of zero is requested.  Default
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ namespace android {
        // BufferQueue will keep track of at most this value of buffers.
        // Attempts at runtime to increase the number of buffers past this
        // will fail.
        enum { NUM_BUFFER_SLOTS = 32 };
        enum { NUM_BUFFER_SLOTS = 64 };

        typedef BufferSlot SlotsType[NUM_BUFFER_SLOTS];
    } // namespace BufferQueueDefs
+1 −1
Original line number Diff line number Diff line
@@ -230,7 +230,7 @@ public:
    //
    // Return of a value other than NO_ERROR means an error has occurred:
    // * NO_INIT - the buffer queue has been abandoned.
    virtual status_t getReleasedBuffers(uint32_t* slotMask) = 0;
    virtual status_t getReleasedBuffers(uint64_t* slotMask) = 0;

    // setDefaultBufferSize is used to set the size of buffers returned by
    // dequeueBuffer when a width and height of zero is requested.  Default
+1 −1
Original line number Diff line number Diff line
@@ -158,7 +158,7 @@ status_t BufferQueue::consumerDisconnect() {
    return mConsumer->disconnect();
}

status_t BufferQueue::getReleasedBuffers(uint32_t* slotMask) {
status_t BufferQueue::getReleasedBuffers(uint64_t* slotMask) {
    return mConsumer->getReleasedBuffers(slotMask);
}

Loading