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

Commit 0579d575 authored by Jamie Gennis's avatar Jamie Gennis Committed by Android (Google) Code Review
Browse files

Merge "Fix a bug in SurfaceTexture::dequeueBuffer." into honeycomb

parents a7196d2e 235c424c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -131,7 +131,7 @@ status_t SurfaceTexture::dequeueBuffer(int *buf) {
    Mutex::Autolock lock(mMutex);
    Mutex::Autolock lock(mMutex);
    int found = INVALID_BUFFER_SLOT;
    int found = INVALID_BUFFER_SLOT;
    for (int i = 0; i < mBufferCount; i++) {
    for (int i = 0; i < mBufferCount; i++) {
        if (!mSlots[i].mOwnedByClient && i != mCurrentTexture) {
        if (!mSlots[i].mOwnedByClient && i != mCurrentTexture && i != mLastQueued) {
            mSlots[i].mOwnedByClient = true;
            mSlots[i].mOwnedByClient = true;
            found = i;
            found = i;
            break;
            break;