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

Commit 3d69bea1 authored by Mathias Agopian's avatar Mathias Agopian
Browse files

fix [4107131] nvidia driver call takes a very long time

We were leaking all EGLSyncKHR objects, over time the list
would grow and become very slow to operate on.

Bug: 4107131
Change-Id: I6c82daf49fe3189d04550781d64d57c30c95f552
parent 2d5cbc92
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line Diff line number Diff line
@@ -2077,14 +2077,15 @@ EGLBoolean eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync)
    if (!validate_display_context(dpy, ctx))
    if (!validate_display_context(dpy, ctx))
        return EGL_FALSE;
        return EGL_FALSE;


    EGLBoolean result = EGL_FALSE;
    egl_context_t * const c = get_context(ctx);
    egl_context_t * const c = get_context(ctx);

    if (c->cnx->egl.eglDestroySyncKHR) {
    if (c->cnx->egl.eglDestroySyncKHR) {
        return c->cnx->egl.eglDestroySyncKHR(
        result = c->cnx->egl.eglDestroySyncKHR(
                dp->disp[c->impl].dpy, syncObject->sync);
                dp->disp[c->impl].dpy, syncObject->sync);
        if (result)
            _s.terminate();
    }
    }

    return result;
    return EGL_FALSE;
}
}


EGLint eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout)
EGLint eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout)