aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2017-08-02 00:59:26 +0100
committerEmil Velikov <[email protected]>2017-08-04 23:57:22 +0100
commit9777c4234b0e78bf79455ff7081068fe3c71a2de (patch)
tree15fd1d4467ed049ac3e967b5bd1ab4b7eba9bd95 /src/egl
parentc961b679fe16fc98c3d04d611abc287f1bcc07b5 (diff)
loader: drop the [gs]et_swap_interval callbacks
Having two callbacks to manage a single int seems like an overkill. Use a cached copy and update that when needed. Signed-off-by: Emil Velikov <[email protected]> --- Might want to look if the dimensions dance in .query_surface ... speaking of which close to nobody implements that ...
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/drivers/dri2/platform_x11_dri3.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/src/egl/drivers/dri2/platform_x11_dri3.c b/src/egl/drivers/dri2/platform_x11_dri3.c
index 9548a249347..3a0efc6ccc9 100644
--- a/src/egl/drivers/dri2/platform_x11_dri3.c
+++ b/src/egl/drivers/dri2/platform_x11_dri3.c
@@ -45,22 +45,6 @@ loader_drawable_to_egl_surface(struct loader_dri3_drawable *draw) {
return (struct dri3_egl_surface *)(((void*) draw) - offset);
}
-static int
-egl_dri3_get_swap_interval(struct loader_dri3_drawable *draw)
-{
- struct dri3_egl_surface *dri3_surf = loader_drawable_to_egl_surface(draw);
-
- return dri3_surf->base.SwapInterval;
-}
-
-static void
-egl_dri3_set_swap_interval(struct loader_dri3_drawable *draw, int interval)
-{
- struct dri3_egl_surface *dri3_surf = loader_drawable_to_egl_surface(draw);
-
- dri3_surf->base.SwapInterval = interval;
-}
-
static void
egl_dri3_set_drawable_size(struct loader_dri3_drawable *draw,
int width, int height)
@@ -112,8 +96,6 @@ egl_dri3_flush_drawable(struct loader_dri3_drawable *draw, unsigned flags)
}
static const struct loader_dri3_vtable egl_dri3_vtable = {
- .get_swap_interval = egl_dri3_get_swap_interval,
- .set_swap_interval = egl_dri3_set_swap_interval,
.set_drawable_size = egl_dri3_set_drawable_size,
.in_current_context = egl_dri3_in_current_context,
.get_dri_context = egl_dri3_get_dri_context,
@@ -142,6 +124,7 @@ dri3_set_swap_interval(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
{
struct dri3_egl_surface *dri3_surf = dri3_egl_surface(surf);
+ dri3_surf->base.SwapInterval = interval;
loader_dri3_set_swap_interval(&dri3_surf->loader_drawable, interval);
return EGL_TRUE;