[vlc-devel] [PATCH 5/6] gl: try to use a Wayland surface before an X11 window

Rémi Denis-Courmont remi at remlab.net
Wed Aug 27 23:31:31 CEST 2014


This part is easy. The real work is done by the OpenGL provider.
---
 modules/video_output/gl.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/video_output/gl.c b/modules/video_output/gl.c
index f3c4352..ad98323 100644
--- a/modules/video_output/gl.c
+++ b/modules/video_output/gl.c
@@ -110,6 +110,13 @@ static vout_window_t *MakeWindow (vout_display_t *vd)
 #elif defined(__ANDROID__)
     cfg.type = VOUT_WINDOW_TYPE_ANDROID_NATIVE;
 #else
+    /* Try Wayland first, then fallback to X11 */
+    cfg.type = VOUT_WINDOW_TYPE_WAYLAND_EGL;
+
+    wnd = vout_display_NewWindow (vd, &cfg);
+    if (wnd != NULL)
+        return wnd;
+
     cfg.type = VOUT_WINDOW_TYPE_XID;
 #endif
 
-- 
2.1.0




More information about the vlc-devel mailing list