[vlc-devel] [PATCH] egl_wl: fallback to eglGetDisplay/eglCreateWindowSurface
Rémi Denis-Courmont
remi at remlab.net
Fri Jun 15 15:54:01 CEST 2018
How do you know that eglGetDisplay expects Wayland?? AFAIK, on Unices, it expects a Xlib Display pointer.
Le 15 juin 2018 15:53:17 GMT+03:00, Thomas Guillem <thomas at gllm.fr> a écrit :
>If the EGL_EXT_platform_wayland extension is not available.
>---
> modules/video_output/opengl/egl.c | 17 +++++++++++------
> 1 file changed, 11 insertions(+), 6 deletions(-)
>
>diff --git a/modules/video_output/opengl/egl.c
>b/modules/video_output/opengl/egl.c
>index 3cfc3f41c3..b30b10af31 100644
>--- a/modules/video_output/opengl/egl.c
>+++ b/modules/video_output/opengl/egl.c
>@@ -267,18 +267,23 @@ static int Open (vlc_object_t *obj, const struct
>gl_api *api)
> goto error;
>
> # ifdef EGL_EXT_platform_wayland
>- if (!CheckClientExt("EGL_EXT_platform_wayland"))
>- goto error;
>-
> /* Resize() should be called with the proper size before Swap() */
> window = wl_egl_window_create(wnd->handle.wl, 1, 1);
> if (window == NULL)
> goto error;
> sys->window = window;
>
>- sys->display = GetDisplayEXT(EGL_PLATFORM_WAYLAND_EXT,
>wnd->display.wl,
>- NULL);
>- createSurface = CreateWindowSurfaceEXT;
>+ if (!CheckClientExt("EGL_EXT_platform_wayland"))
>+ {
>+ sys->display = eglGetDisplay(wnd->display.wl);
>+ window = &sys->window;
>+ }
>+ else
>+ {
>+ sys->display = GetDisplayEXT(EGL_PLATFORM_WAYLAND_EXT,
>wnd->display.wl,
>+ NULL);
>+ createSurface = CreateWindowSurfaceEXT;
>+ }
>
> # endif
>
>--
>2.17.1
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel
--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180615/6917d872/attachment.html>
More information about the vlc-devel
mailing list