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

Commit 24752642 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: I1c41256ffbc30abcf9f7b0b5fcf53da40462da28
parent 430b61c7
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -27,6 +27,8 @@
#include <media/hardware/MetadataBufferType.h>
#include <ui/GraphicBuffer.h>

#include <inttypes.h>

namespace android {

static const bool EXTRA_CHECK = true;
@@ -761,13 +763,13 @@ void GraphicBufferSource::onFrameAvailable() {
void GraphicBufferSource::onBuffersReleased() {
    Mutex::Autolock lock(mMutex);

    uint32_t slotMask;
    uint64_t slotMask;
    if (mConsumer->getReleasedBuffers(&slotMask) != NO_ERROR) {
        ALOGW("onBuffersReleased: unable to get released buffer set");
        slotMask = 0xffffffff;
        slotMask = 0xffffffffffffffffULL;
    }

    ALOGV("onBuffersReleased: 0x%08x", slotMask);
    ALOGV("onBuffersReleased: 0x%016" PRIx64, slotMask);

    for (int i = 0; i < BufferQueue::NUM_BUFFER_SLOTS; i++) {
        if ((slotMask & 0x01) != 0) {