summaryrefslogtreecommitdiffstats
path: root/video/out/wayland_common.h
diff options
context:
space:
mode:
authorAlexander Preisinger <alexander.preisinger@gmail.com>2014-01-04 16:43:58 +0100
committerAlexander Preisinger <alexander.preisinger@gmail.com>2014-01-04 16:43:58 +0100
commit17b52cc4a9a8d044bbeb2696f507a361df370e4e (patch)
treeaf7ba33446fe21e162189a774b890a7aa0eee5a6 /video/out/wayland_common.h
parentf5565f33c78ca5060981c1bca048b3534a4bb418 (diff)
downloadmpv-17b52cc4a9a8d044bbeb2696f507a361df370e4e.tar.bz2
mpv-17b52cc4a9a8d044bbeb2696f507a361df370e4e.tar.xz
wayland/egl: add egl_context to the wayland state
At the moment there are visual glitches when we resize the window. This happens because in wayland there a special function for resizing EGL windows. To prevent the glitches move the egl_context to the wayland state in wayland_common.h and add a new control function to gl_wayland.c to wrap the vo_wayland_control function to check for resize events. With the new control wrapper the glitches are gone and the resizing is fluid.
Diffstat (limited to 'video/out/wayland_common.h')
-rw-r--r--video/out/wayland_common.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/video/out/wayland_common.h b/video/out/wayland_common.h
index 01ff09fa43..ac5fc3cf39 100644
--- a/video/out/wayland_common.h
+++ b/video/out/wayland_common.h
@@ -27,6 +27,12 @@
#include "config.h"
+#if HAVE_GL_WAYLAND
+#include <wayland-egl.h>
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+#endif
+
struct vo;
struct vo_wayland_output {
@@ -43,6 +49,20 @@ struct vo_wayland_state {
struct vo *vo;
struct mp_log* log;
+#if HAVE_GL_WAYLAND
+ struct {
+ EGLSurface egl_surface;
+
+ struct wl_egl_window *egl_window;
+
+ struct {
+ EGLDisplay dpy;
+ EGLContext ctx;
+ EGLConfig conf;
+ } egl;
+ } egl_context;
+#endif
+
struct {
int fd;
struct wl_display *display;