From 26d5ca44ba13b940afc3ddc0190f9936d500a1fc Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Sat, 22 Jun 2019 22:32:50 +0100 Subject: [PATCH] egl: move eglSwapInterval() fallback to eglapi.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Eric Engestrom Reviewed-by: Tapani Pälli --- src/egl/main/eglapi.c | 11 ++++++++--- src/egl/main/eglfallbacks.c | 2 -- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index b3059465d20..60f59bb165a 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -1296,10 +1296,15 @@ eglSwapInterval(EGLDisplay dpy, EGLint interval) surf->Config->MinSwapInterval, surf->Config->MaxSwapInterval); - if (surf->SwapInterval != interval) - ret = drv->API.SwapInterval(drv, disp, surf, interval); - else + if (surf->SwapInterval != interval) { + if (drv->API.SwapInterval) + ret = drv->API.SwapInterval(drv, disp, surf, interval); + else + ret = _eglSwapInterval(drv, disp, surf, interval); + } + else { ret = EGL_TRUE; + } if (ret) surf->SwapInterval = interval; diff --git a/src/egl/main/eglfallbacks.c b/src/egl/main/eglfallbacks.c index 05d4515a61d..891c6fc3b71 100644 --- a/src/egl/main/eglfallbacks.c +++ b/src/egl/main/eglfallbacks.c @@ -42,7 +42,5 @@ void _eglInitDriverFallbacks(_EGLDriver *drv) { - drv->API.SwapInterval = _eglSwapInterval; - drv->API.GetSyncAttrib = _eglGetSyncAttrib; } -- 2.30.2