summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Preisinger <alexander.preisinger@gmail.com>2014-01-04 21:04:11 +0100
committerwm4 <wm4@nowhere>2014-01-06 20:22:43 +0100
commit6f5dfb5102a14024bcd76036a1d953214288085d (patch)
tree801c1601086cdb26cfe5df5597c4c786aa4f4d7c
parent59f970d492869356ad9627875c7a94e2ee446930 (diff)
downloadmpv-6f5dfb5102a14024bcd76036a1d953214288085d.tar.bz2
mpv-6f5dfb5102a14024bcd76036a1d953214288085d.tar.xz
Revert "wayland/egl: use redraw callback"
Because of this commit there were problems displaying the frmase in their right order. This reverts commit 96e75d234a4df1a09f38eaf932d00d79dccdc324. Conflicts: video/out/gl_wayland.c video/out/wayland_common.h
-rw-r--r--video/out/gl_wayland.c27
-rw-r--r--video/out/wayland_common.h2
2 files changed, 1 insertions, 28 deletions
diff --git a/video/out/gl_wayland.c b/video/out/gl_wayland.c
index b192a2396d..2d4d24ce37 100644
--- a/video/out/gl_wayland.c
+++ b/video/out/gl_wayland.c
@@ -196,35 +196,10 @@ static void releaseGlContext_wayland(MPGLContext *ctx)
wl->egl_context.egl.ctx = NULL;
}
-static const struct wl_callback_listener frame_listener;
-
-static void frame_handle_redraw(void *data,
- struct wl_callback *callback,
- uint32_t time)
-
-{
- MPGLContext *ctx = data;
- struct vo_wayland_state *wl = ctx->vo->wayland;
-
- if (callback)
- wl_callback_destroy(callback);
-
- wl->egl_context.redraw_callback = wl_surface_frame(wl->window.surface);
- wl_callback_add_listener(wl->egl_context.redraw_callback, &frame_listener, ctx);
-
- eglSwapBuffers(wl->egl_context.egl.dpy, wl->egl_context.egl_surface);
-}
-
-static const struct wl_callback_listener frame_listener = {
- frame_handle_redraw
-};
-
static void swapGlBuffers_wayland(MPGLContext *ctx)
{
struct vo_wayland_state *wl = ctx->vo->wayland;
-
- if (!wl->egl_context.redraw_callback)
- frame_handle_redraw(ctx, NULL, 0);
+ eglSwapBuffers(wl->egl_context.egl.dpy, wl->egl_context.egl_surface);
}
static int control(struct vo *vo, int *events, int request, void *data)
diff --git a/video/out/wayland_common.h b/video/out/wayland_common.h
index 9289e53b31..efbe071f9d 100644
--- a/video/out/wayland_common.h
+++ b/video/out/wayland_common.h
@@ -60,8 +60,6 @@ struct vo_wayland_state {
EGLContext ctx;
EGLConfig conf;
} egl;
-
- struct wl_callback * redraw_callback;
} egl_context;
#endif