egl: move eglSurfaceAttrib() fallback to eglapi.c
authorEric Engestrom <eric.engestrom@intel.com>
Sat, 22 Jun 2019 21:32:26 +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 4585540437b72518ae280f3790f6acc1b801d417..b3059465d206ab6ebfef33c1cd49d07d4d557b73 100644 (file)
@@ -1228,7 +1228,11 @@ eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface,
 
    _EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
    _EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
-   ret = drv->API.SurfaceAttrib(drv, disp, surf, attribute, value);
+
+   if (drv->API.SurfaceAttrib)
+      ret = drv->API.SurfaceAttrib(drv, disp, surf, attribute, value);
+   else
+      ret = _eglSurfaceAttrib(drv, disp, surf, attribute, value);
 
    RETURN_EGL_EVAL(disp, ret);
 }
index 8829a4e80d7045af4ce48df824cc90faff7a2658..05d4515a61df2202e1dfde3d37c661b75f8f4198 100644 (file)
@@ -42,8 +42,6 @@
 void
 _eglInitDriverFallbacks(_EGLDriver *drv)
 {
-   drv->API.SurfaceAttrib = _eglSurfaceAttrib;
-
    drv->API.SwapInterval = _eglSwapInterval;
 
    drv->API.GetSyncAttrib = _eglGetSyncAttrib;