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

Commit 33fcc2ec authored by Pablo Ceballos's avatar Pablo Ceballos
Browse files

Don't generate EGL fence in single buffer mode

Don't do sync operations or generate an EGLFence in SurfaceFlinger's
GLConsumer if re-using the same slot for consecutive buffers.

Bug 24940410

Change-Id: I1d42c6e1ebb3be241d3e332e726c898e8671cc8d
parent 43ec13d1
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
@@ -408,6 +408,7 @@ status_t GLConsumer::updateAndReleaseLocked(const BufferItem& item)
    }

    // Do whatever sync ops we need to do before releasing the old slot.
    if (!item.mSingleBufferMode || slot != mCurrentTexture) {
        err = syncForReleaseLocked(mEglDisplay);
        if (err != NO_ERROR) {
            // Release the buffer we just acquired.  It's not safe to
@@ -418,6 +419,7 @@ status_t GLConsumer::updateAndReleaseLocked(const BufferItem& item)
                    mEglDisplay, EGL_NO_SYNC_KHR);
            return err;
        }
    }

    GLC_LOGV("updateAndRelease: (slot=%d buf=%p) -> (slot=%d buf=%p)",
            mCurrentTexture, mCurrentTextureImage != NULL ?