egl/wl,x11: Call dri2_swap_interval() statically
authorChad Versace <chad.versace@linux.intel.com>
Tue, 28 Jan 2014 00:42:10 +0000 (16:42 -0800)
committerChad Versace <chad.versace@linux.intel.com>
Mon, 17 Mar 2014 22:36:03 +0000 (15:36 -0700)
Don't call it through the driver dispatch table. Just call it
statically.

This prepares for the EGL platform extensions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
src/egl/drivers/dri2/platform_wayland.c
src/egl/drivers/dri2/platform_x11.c

index aea2793a63b5cbdbfb82cf3da1ddc55964fc4207..6a75355b587ad37f0b8af474931b50a862d7e082 100644 (file)
@@ -47,6 +47,10 @@ enum wl_drm_format_flags {
    HAS_RGB565 = 4,
 };
 
+static EGLBoolean
+dri2_wl_swap_interval(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
+                      EGLint interval);
+
 static void
 sync_callback(void *data, struct wl_callback *callback, uint32_t serial)
 {
@@ -191,7 +195,7 @@ dri2_wl_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
                                  window, attrib_list);
 
    if (surf != NULL)
-      drv->API.SwapInterval(drv, disp, surf, dri2_dpy->default_swap_interval);
+      dri2_wl_swap_interval(drv, disp, surf, dri2_dpy->default_swap_interval);
 
    return surf;
 }
index eb1565013fc4f55ae66b845c17bb913913082466..ea871fd810cc9e3a521c9e3b1940694a8f70aaab 100644 (file)
 
 #include "egl_dri2.h"
 
+static EGLBoolean
+dri2_x11_swap_interval(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
+                       EGLint interval);
+
 static void
 swrastCreateDrawable(struct dri2_egl_display * dri2_dpy,
                      struct dri2_egl_surface * dri2_surf,
@@ -287,7 +291,7 @@ dri2_x11_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
       surf->SwapInterval = 1;
 
       /* Override that with a driconf-set value. */
-      drv->API.SwapInterval(drv, disp, surf, dri2_dpy->default_swap_interval);
+      dri2_x11_swap_interval(drv, disp, surf, dri2_dpy->default_swap_interval);
    }
 
    return surf;