toytoolkit: fix EGL surface creation for lazy drivers

Some DRI drivers, including VMware vmwgfx, do not support
calling eglQueryString() with a EGL_NO_DISPLAY parameter.

Allow toytoolkit to create EGL surfaces with them, by
falling back to the old creation method.

Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
dev
Manuel Bachmann 10 years ago committed by Pekka Paalanen
parent 56d9b88e69
commit 5d1d2ca325
  1. 5
      shared/platform.h

@ -55,8 +55,9 @@ weston_platform_get_egl_proc_address(const char *address)
{
const char *extensions = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS);
if (strstr(extensions, "EGL_EXT_platform_wayland")
|| strstr(extensions, "EGL_KHR_platform_wayland")) {
if (extensions
&& (strstr(extensions, "EGL_EXT_platform_wayland")
|| strstr(extensions, "EGL_KHR_platform_wayland"))) {
return (void *) eglGetProcAddress(address);
}

Loading…
Cancel
Save