egl: move eglSwapInterval() fallback to eglapi.c
authorEric Engestrom <eric.engestrom@intel.com>
Sat, 22 Jun 2019 21:32:50 +0000 (22:32 +0100)
committerEric Engestrom <eric@engestrom.ch>
Tue, 25 Jun 2019 06:36:54 +0000 (06:36 +0000)
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/egl/main/eglapi.c
src/egl/main/eglfallbacks.c

index b305946..60f59bb 100644 (file)
@@ -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;
index 05d4515..891c6fc 100644 (file)
@@ -42,7 +42,5 @@
 void
 _eglInitDriverFallbacks(_EGLDriver *drv)
 {
-   drv->API.SwapInterval = _eglSwapInterval;
-
    drv->API.GetSyncAttrib = _eglGetSyncAttrib;
 }