mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
d3eafc976d
commit
c17c26f404
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue