diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2015-03-22 02:47:27 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-03-23 21:53:32 +0100 |
commit | 3714430cdf0c1515da5dea9e3c098f02802a45ee (patch) | |
tree | d8b2c6071e959d3374cf4d1b68fc268dad14a161 /video/out/gl_wayland.c | |
parent | dd08aa7364e061132b795f6e55aaeeb2e4854b8e (diff) | |
download | mpv-3714430cdf0c1515da5dea9e3c098f02802a45ee.tar.bz2 mpv-3714430cdf0c1515da5dea9e3c098f02802a45ee.tar.xz |
vo_wayland: share frame callbacks.
Define frame callback logic in wayland_common.c
As this should be used by opengl renderer as well.
Preferably drawing should be skipped entierly when no frame callbacks
are received. However, for now only swap buffers is skipped.
Diffstat (limited to 'video/out/gl_wayland.c')
-rw-r--r-- | video/out/gl_wayland.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/video/out/gl_wayland.c b/video/out/gl_wayland.c index a1c04b199d..d86faa8d95 100644 --- a/video/out/gl_wayland.c +++ b/video/out/gl_wayland.c @@ -196,7 +196,12 @@ static void releaseGlContext_wayland(MPGLContext *ctx) static void swapGlBuffers_wayland(MPGLContext *ctx) { struct vo_wayland_state *wl = ctx->vo->wayland; + + if (!wl->frame.pending) + return; + eglSwapBuffers(wl->egl_context.egl.dpy, wl->egl_context.egl_surface); + wl->frame.pending = false; } static int control(struct vo *vo, int *events, int request, void *data) |