From: Eric Engestrom Date: Sat, 22 Jun 2019 21:32:50 +0000 (+0100) Subject: egl: move eglSwapInterval() fallback to eglapi.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=26d5ca44ba13b940afc3ddc0190f9936d500a1fc;p=mesa.git egl: move eglSwapInterval() fallback to eglapi.c Signed-off-by: Eric Engestrom Reviewed-by: Tapani Pälli --- 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; }