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

Commit d033fc8e authored by Peiyong Lin's avatar Peiyong Lin Committed by android-build-merger
Browse files

Merge "[RenderEngine] Release the fence before calling eglCreateSyncKHR." into...

Merge "[RenderEngine] Release the fence before calling eglCreateSyncKHR." into qt-dev am: 9a12f774
am: 9ae07863

Change-Id: I18249a1d139f01ba5bd608780aeccd09f6aa8f31
parents 7a8193b5 9ae07863
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -540,16 +540,14 @@ bool GLESRenderEngine::waitFence(base::unique_fd fenceFd) {
        return false;
    }

    EGLint attribs[] = {EGL_SYNC_NATIVE_FENCE_FD_ANDROID, fenceFd, EGL_NONE};
    // release the fd and transfer the ownership to EGLSync
    EGLint attribs[] = {EGL_SYNC_NATIVE_FENCE_FD_ANDROID, fenceFd.release(), EGL_NONE};
    EGLSyncKHR sync = eglCreateSyncKHR(mEGLDisplay, EGL_SYNC_NATIVE_FENCE_ANDROID, attribs);
    if (sync == EGL_NO_SYNC_KHR) {
        ALOGE("failed to create EGL native fence sync: %#x", eglGetError());
        return false;
    }

    // fenceFd is now owned by EGLSync
    (void)fenceFd.release();

    // XXX: The spec draft is inconsistent as to whether this should return an
    // EGLint or void.  Ignore the return value for now, as it's not strictly
    // needed.