diff options
author | wm4 <wm4@nowhere> | 2018-08-31 20:08:08 +0200 |
---|---|---|
committer | Anton Kindestam <antonki@kth.se> | 2018-12-06 10:30:25 +0100 |
commit | b1ba7de34dd5685a082454817f23509d1c28e4aa (patch) | |
tree | dc7c077d64742cb728c88fc582f952718a61155d /video/out/vo_gpu.c | |
parent | 83884fdf03fc991679bea53d3d5bddf97ed16a9b (diff) | |
download | mpv-b1ba7de34dd5685a082454817f23509d1c28e4aa.tar.bz2 mpv-b1ba7de34dd5685a082454817f23509d1c28e4aa.tar.xz |
vo: use a struct for vsync feedback stuff
So new useless stuff can be easily added.
Diffstat (limited to 'video/out/vo_gpu.c')
-rw-r--r-- | video/out/vo_gpu.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/video/out/vo_gpu.c b/video/out/vo_gpu.c index 3535ae3e7e..0162e420e8 100644 --- a/video/out/vo_gpu.c +++ b/video/out/vo_gpu.c @@ -98,11 +98,12 @@ static void flip_page(struct vo *vo) sw->fns->swap_buffers(sw); } -static double get_latency(struct vo *vo) +static void get_vsync(struct vo *vo, struct vo_vsync_info *info) { struct gpu_priv *p = vo->priv; struct ra_swapchain *sw = p->ctx->swapchain; - return sw->fns->get_latency ? sw->fns->get_latency(sw) : -1; + if (sw->fns->get_vsync) + sw->fns->get_vsync(sw, info); } static int query_format(struct vo *vo, int format) @@ -333,7 +334,7 @@ const struct vo_driver video_out_gpu = { .get_image = get_image, .draw_frame = draw_frame, .flip_page = flip_page, - .get_latency = get_latency, + .get_vsync = get_vsync, .wait_events = wait_events, .wakeup = wakeup, .uninit = uninit, |