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

Commit b57fa45c authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Codec2Cient: Do not hold lock during IGBP operations" into main am:...

Merge "Codec2Cient: Do not hold lock during IGBP operations" into main am: 644db222 am: a57a243c

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/2829074



Change-Id: I2ff2c86d2a676592da064bb3c68bb784fa39c4ab
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 6fd88db2 a57a243c
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -141,11 +141,14 @@ status_t attachToBufferQueue(const C2ConstGraphicBlock& block,
                            "status = " << INVALID_OPERATION << ".";
            return INVALID_OPERATION;
        }
        result = igbp->attachBuffer(bqSlot, graphicBuffer);
        if (result == OK) {
        syncVar->notifyDequeuedLocked();
        }
        syncVar->unlock();
        result = igbp->attachBuffer(bqSlot, graphicBuffer);
        if (result != OK) {
            syncVar->lock();
            syncVar->notifyQueuedLocked();
            syncVar->unlock();
        }
    } else {
        result = igbp->attachBuffer(bqSlot, graphicBuffer);
    }
@@ -435,13 +438,13 @@ status_t OutputBufferQueue::outputBuffer(

        auto syncVar = syncMem ? syncMem->mem() : nullptr;
        if(syncVar) {
            syncVar->lock();
            status = outputIgbp->queueBuffer(static_cast<int>(bqSlot),
                                         input, output);
            if (status == OK) {
                syncVar->lock();
                syncVar->notifyQueuedLocked();
            }
                syncVar->unlock();
            }
        } else {
            status = outputIgbp->queueBuffer(static_cast<int>(bqSlot),
                                         input, output);
@@ -490,13 +493,13 @@ status_t OutputBufferQueue::outputBuffer(
    auto syncVar = syncMem ? syncMem->mem() : nullptr;
    status_t status = OK;
    if (syncVar) {
        syncVar->lock();
        status = outputIgbp->queueBuffer(static_cast<int>(bqSlot),
                                                  input, output);
        if (status == OK) {
            syncVar->lock();
            syncVar->notifyQueuedLocked();
        }
            syncVar->unlock();
        }
    } else {
        status = outputIgbp->queueBuffer(static_cast<int>(bqSlot),
                                                  input, output);