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 b3059465d206ab6ebfef33c1cd49d07d4d557b73..60f59bb165ad9283a4fffd3d900e95460eb8b709 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 05d4515a61df2202e1dfde3d37c661b75f8f4198..891c6fc3b71ab42be6e10fe635a2886dc6fef418 100644 (file)
@@ -42,7 +42,5 @@
 void
 _eglInitDriverFallbacks(_EGLDriver *drv)
 {
-   drv->API.SwapInterval = _eglSwapInterval;
-
    drv->API.GetSyncAttrib = _eglGetSyncAttrib;
 }