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

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

Merge "SurfaceTexture: fix a bug with buffer reallocation" into ics-mr1

parents 0f83b2f9 aaa3ecff
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -437,6 +437,11 @@ status_t SurfaceTexture::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
            mSlots[buf].mEglImage = EGL_NO_IMAGE_KHR;
            mSlots[buf].mEglDisplay = EGL_NO_DISPLAY;
        }
        if (mCurrentTexture == buf) {
            // The current texture no longer references the buffer in this slot
            // since we just allocated a new buffer.
            mCurrentTexture = INVALID_BUFFER_SLOT;
        }
        returnFlags |= ISurfaceTexture::BUFFER_NEEDS_REALLOCATION;
    }
    ST_LOGV("dequeueBuffer: returning slot=%d buf=%p flags=%#x", buf,