From c17c26f404ad064b7b0e67697cf10c9dada9ca37 Mon Sep 17 00:00:00 2001 From: Rostislav Pehlivanov Date: Sat, 7 Jan 2017 10:29:15 +0000 Subject: [PATCH] context_wayland: do not call vo_wayland_request_frame() upon bufferswap vo_wayland_wait_events() is going to return when its time to swap the buffers anyway, calling request_frame() before makes no sense. Fixes the constant high CPU usage by the compositor when mpv is paused and the window is in view. --- video/out/opengl/context_wayland.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/video/out/opengl/context_wayland.c b/video/out/opengl/context_wayland.c index 3864e2887f..127ddcaa93 100644 --- a/video/out/opengl/context_wayland.c +++ b/video/out/opengl/context_wayland.c @@ -161,9 +161,6 @@ static void waylandgl_swap_buffers(MPGLContext *ctx) { struct vo_wayland_state *wl = ctx->vo->wayland; - if (!wl->frame.callback) - vo_wayland_request_frame(ctx->vo, NULL, NULL); - vo_wayland_wait_events(ctx->vo, 0); eglSwapBuffers(wl->egl_context.egl.dpy, wl->egl_context.egl_surface);