summaryrefslogtreecommitdiffstats
path: root/src/glx
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/glx
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/glx')
-rw-r--r--src/glx/dri3_glx.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c
index 64c0b9e7b9c..024e8ab0479 100644
--- a/src/glx/dri3_glx.c
+++ b/src/glx/dri3_glx.c
@@ -86,22 +86,6 @@ loader_drawable_to_dri3_drawable(struct loader_dri3_drawable *draw) {
return (struct dri3_drawable *)(((void*) draw) - offset);
}
-static int
-glx_dri3_get_swap_interval(struct loader_dri3_drawable *draw)
-{
- struct dri3_drawable *priv = loader_drawable_to_dri3_drawable(draw);
-
- return priv->swap_interval;
-}
-
-static void
-glx_dri3_set_swap_interval(struct loader_dri3_drawable *draw, int interval)
-{
- struct dri3_drawable *priv = loader_drawable_to_dri3_drawable(draw);
-
- priv->swap_interval = interval;
-}
-
static void
glx_dri3_set_drawable_size(struct loader_dri3_drawable *draw,
int width, int height)
@@ -173,8 +157,6 @@ glx_dri3_show_fps(struct loader_dri3_drawable *draw, uint64_t current_ust)
}
static const struct loader_dri3_vtable glx_dri3_vtable = {
- .get_swap_interval = glx_dri3_get_swap_interval,
- .set_swap_interval = glx_dri3_set_swap_interval,
.set_drawable_size = glx_dri3_set_drawable_size,
.in_current_context = glx_dri3_in_current_context,
.get_dri_context = glx_dri3_get_dri_context,
@@ -637,6 +619,7 @@ dri3_set_swap_interval(__GLXDRIdrawable *pdraw, int interval)
break;
}
+ priv->swap_interval = interval;
loader_dri3_set_swap_interval(&priv->loader_drawable, interval);
return 0;