From d29e699491b64e659df1941b2f3f87c931f23789 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Wed, 19 Aug 2015 22:42:40 +0300 Subject: gl_wayland: Wait for frame callbacks Keep glSwapInterval(0) on to avoid blocking on gl calls, but wait for frame callbacks so we play nice with compositor. --- video/out/gl_wayland.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/video/out/gl_wayland.c b/video/out/gl_wayland.c index 2a565a36d6..a6a23bd180 100644 --- a/video/out/gl_wayland.c +++ b/video/out/gl_wayland.c @@ -210,6 +210,11 @@ static void swapGlBuffers_wayland(MPGLContext *ctx) { struct vo_wayland_state *wl = ctx->vo->wayland; + if (!wl->frame.callback) + vo_wayland_request_frame(ctx->vo, NULL, NULL); + + if (!vo_wayland_wait_frame(ctx->vo)) + MP_DBG(wl, "discarding frame callback\n"); eglSwapBuffers(wl->egl_context.egl.dpy, wl->egl_context.egl_surface); } -- cgit v1.2.3