summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/context.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/opengl/context.c')
-rw-r--r--video/out/opengl/context.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/video/out/opengl/context.c b/video/out/opengl/context.c
index 43b57aa4ed..44e64b7d9a 100644
--- a/video/out/opengl/context.c
+++ b/video/out/opengl/context.c
@@ -313,9 +313,16 @@ void ra_gl_ctx_swap_buffers(struct ra_swapchain *sw)
}
}
+static double ra_gl_ctx_get_latency(struct ra_swapchain *sw)
+{
+ struct priv *p = sw->priv;
+ return p->params.get_latency ? p->params.get_latency(sw->ctx) : -1;
+}
+
static const struct ra_swapchain_fns ra_gl_swapchain_fns = {
.color_depth = ra_gl_ctx_color_depth,
.start_frame = ra_gl_ctx_start_frame,
.submit_frame = ra_gl_ctx_submit_frame,
.swap_buffers = ra_gl_ctx_swap_buffers,
+ .get_latency = ra_gl_ctx_get_latency,
};