0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

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.
This commit is contained in:
Jari Vetoniemi 2015-08-19 22:42:40 +03:00 committed by wm4
parent e05dc7bfb7
commit d29e699491

View File

@ -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);
}