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

Commit 02a7be74 authored by Jesse Hall's avatar Jesse Hall Committed by Android (Google) Code Review
Browse files

Merge "Clarify aborted updateTexImage use of fences"

parents 962174da d58c304c
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -236,10 +236,8 @@ status_t SurfaceTexture::updateTexImage(BufferRejecter* rejecter) {
        // not accept this buffer. this is used by SurfaceFlinger to
        // reject buffers which have the wrong size
        if (rejecter && rejecter->reject(mEGLSlots[buf].mGraphicBuffer, item)) {
            mBufferQueue->releaseBuffer(buf, dpy, mEGLSlots[buf].mFence,
                    mEGLSlots[buf].mReleaseFence);
            mEGLSlots[buf].mFence = EGL_NO_SYNC_KHR;
            mEGLSlots[buf].mReleaseFence.clear();
            mBufferQueue->releaseBuffer(buf, dpy, EGL_NO_SYNC_KHR,
                    Fence::NO_FENCE);
            glBindTexture(mTexTarget, mTexName);
            return NO_ERROR;
        }
@@ -286,10 +284,8 @@ status_t SurfaceTexture::updateTexImage(BufferRejecter* rejecter) {
        if (err != NO_ERROR) {
            // Release the buffer we just acquired.  It's not safe to
            // release the old buffer, so instead we just drop the new frame.
            mBufferQueue->releaseBuffer(buf, dpy, mEGLSlots[buf].mFence,
                    mEGLSlots[buf].mReleaseFence);
            mEGLSlots[buf].mFence = EGL_NO_SYNC_KHR;
            mEGLSlots[buf].mReleaseFence.clear();
            mBufferQueue->releaseBuffer(buf, dpy, EGL_NO_SYNC_KHR,
                    Fence::NO_FENCE);
            return err;
        }