[vlc-devel] [PATCH] egl_wl: fallback to eglGetDisplay/eglCreateWindowSurface
Thomas Guillem
thomas at gllm.fr
Fri Jun 15 14:53:17 CEST 2018
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
More information about the vlc-devel
mailing list