From 6f5dfb5102a14024bcd76036a1d953214288085d Mon Sep 17 00:00:00 2001 From: Alexander Preisinger Date: Sat, 4 Jan 2014 21:04:11 +0100 Subject: 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 --- video/out/gl_wayland.c | 27 +-------------------------- video/out/wayland_common.h | 2 -- 2 files changed, 1 insertion(+), 28 deletions(-) (limited to 'video') 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 -- cgit v1.2.3