summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2017-07-31 18:03:16 +0100
committerEric Engestrom <[email protected]>2017-08-01 17:36:57 +0100
commit991ec1b81a76de24fd013d2fd6b803408c97ab64 (patch)
tree1a123a23376f87c165417d77e998f44c39c011bd
parent97eadb07e7deeb62175da972bfa7a1645798d0ba (diff)
egl: make platform's SwapInterval() optional
Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
-rw-r--r--src/egl/drivers/dri2/platform_wayland.c11
-rw-r--r--src/egl/main/eglapi.c2
2 files changed, 1 insertions, 12 deletions
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 02db473c8ca..73966b7c504 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -1139,15 +1139,6 @@ static const struct wl_registry_listener registry_listener_drm = {
.global_remove = registry_handle_global_remove
};
-static EGLBoolean
-dri2_wl_swap_interval(_EGLDriver *drv,
- _EGLDisplay *disp,
- _EGLSurface *surf,
- EGLint interval)
-{
- return EGL_TRUE;
-}
-
static void
dri2_wl_setup_swap_interval(struct dri2_egl_display *dri2_dpy)
{
@@ -1193,7 +1184,6 @@ static const struct dri2_egl_display_vtbl dri2_wl_display_vtbl = {
.create_pbuffer_surface = dri2_fallback_create_pbuffer_surface,
.destroy_surface = dri2_wl_destroy_surface,
.create_image = dri2_create_image_khr,
- .swap_interval = dri2_wl_swap_interval,
.swap_buffers = dri2_wl_swap_buffers,
.swap_buffers_with_damage = dri2_wl_swap_buffers_with_damage,
.swap_buffers_region = dri2_fallback_swap_buffers_region,
@@ -1894,7 +1884,6 @@ static const struct dri2_egl_display_vtbl dri2_wl_swrast_display_vtbl = {
.create_pbuffer_surface = dri2_fallback_create_pbuffer_surface,
.destroy_surface = dri2_wl_destroy_surface,
.create_image = dri2_fallback_create_image_khr,
- .swap_interval = dri2_wl_swap_interval,
.swap_buffers = dri2_wl_swrast_swap_buffers,
.swap_buffers_with_damage = dri2_fallback_swap_buffers_with_damage,
.swap_buffers_region = dri2_fallback_swap_buffers_region,
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index c5e3955c48c..65fb117f087 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -1205,7 +1205,7 @@ eglSwapInterval(EGLDisplay dpy, EGLint interval)
surf->Config->MinSwapInterval,
surf->Config->MaxSwapInterval);
- if (surf->SwapInterval != interval)
+ if (surf->SwapInterval != interval && drv->API.SwapInterval)
ret = drv->API.SwapInterval(drv, disp, surf, interval);
else
ret = EGL_TRUE;