diff libvo/vo_gl.c @ 36307:a3a1ad19b8b4

On X11 use root window as "hidden" window instead of an unmaped window. Creating an unmaped window has ugly side-effects like the window still appearing for a short time and -geometry not working with some window managers. Since creating a GL context for the root window might not work also add fallback behaviour.
author reimar
date Mon, 05 Aug 2013 16:48:56 +0000
parents 1a1d0d3220e7
children 687e65bf99f9
line wrap: on
line diff
--- a/libvo/vo_gl.c	Mon Aug 05 06:46:41 2013 +0000
+++ b/libvo/vo_gl.c	Mon Aug 05 16:48:56 2013 +0000
@@ -1366,7 +1366,10 @@
       if (!allow_sw && isSoftwareGl())
         goto err_out;
       autodetectGlExtensions();
-    } else if (use_ycbcr == -1) {
+    }
+    if (use_yuv == -1)
+      use_yuv = glctx.type == GLTYPE_EGL_X11 || glctx.type == GLTYPE_EGL_ANDROID ? YUV_CONVERSION_SL_PROGRAM : YUV_CONVERSION_FRAGMENT_LOOKUP; // mostly sensible fallback
+    if (use_ycbcr == -1) {
       // rare feature, not worth creating a window to detect
       use_ycbcr = 0;
     }