From: Eric Engestrom Date: Sat, 1 Aug 2020 22:43:52 +0000 (+0200) Subject: egl: simplify eglSwapInterval() fallback logic X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f4c1c21306060c904210fd596421cf077b2eb613;p=mesa.git egl: simplify eglSwapInterval() fallback logic Signed-off-by: Eric Engestrom Reviewed-by: Emil Velikov Part-of: --- diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index e6ee31ceb18..405be0367d9 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -1287,15 +1287,10 @@ eglSwapInterval(EGLDisplay dpy, EGLint interval) surf->Config->MinSwapInterval, surf->Config->MaxSwapInterval); - if (surf->SwapInterval != interval) { - if (disp->Driver->SwapInterval) - ret = disp->Driver->SwapInterval(disp, surf, interval); - else - ret = EGL_TRUE; - } - else { + if (surf->SwapInterval != interval && disp->Driver->SwapInterval) + ret = disp->Driver->SwapInterval(disp, surf, interval); + else ret = EGL_TRUE; - } if (ret) surf->SwapInterval = interval;