[vlc-devel] [vlc-commits] EGL: add the OpenGL ES 2.0 support for android

Rémi Denis-Courmont remi at remlab.net
Fri Nov 8 16:20:36 CET 2013


Le vendredi 8 novembre 2013 13:53:11 Adrien Maglo a écrit :
> diff --git a/modules/video_output/gl.c b/modules/video_output/gl.c
> index 7217eed..9034612 100644
> --- a/modules/video_output/gl.c
> +++ b/modules/video_output/gl.c
> @@ -105,14 +105,14 @@ static vout_window_t *MakeWindow (vout_display_t *vd)
>      };
>      vout_window_t *wnd;
> 
> -#ifdef _WIN32
> +#if defined(_WIN32)
>      cfg.type = VOUT_WINDOW_TYPE_HWND;
> -    wnd = vout_display_NewWindow (vd, &cfg);
> -    if (wnd != NULL)
> -        return wnd;
> +#elif defined(__ANDROID__)
> +    cfg.type = VOUT_WINDOW_TYPE_ANDROID_NATIVE;
> +#else
> +    cfg.type = VOUT_WINDOW_TYPE_XID;
>  #endif
> 
> -    cfg.type = VOUT_WINDOW_TYPE_XID;
>      wnd = vout_display_NewWindow (vd, &cfg);
>      if (wnd != NULL)
>          return wnd;

Most certainly nobody cares about OpenGL-through-X11 on Windows, but this 
"code factorization" breaks future run-time detection for alternate display 
serves such as Mir or Wayland.

-- 
Rémi Denis-Courmont
http://www.remlab.net/




More information about the vlc-devel mailing list