egl: Don't require eglGetPlatformDisplayEXT

Trying to unilaterally require eglGetPlatformDisplayEXT causes problems in
scenarios where this method is not available. Besides, this should only be
required on Wayland, so we can stop requiring it always and simply let the
eglGetPlatformDisplay() function error accordingly when needed.

https://bugzilla.gnome.org/show_bug.cgi?id=786619
This commit is contained in:
Mario Sanchez Prada 2017-08-22 17:45:19 +02:00
parent 0f9686fb5a
commit e075242801

View File

@ -762,19 +762,12 @@ meta_egl_query_dma_buf_modifiers (MetaEgl *egl,
#define GET_EGL_PROC_ADDR(proc) \ #define GET_EGL_PROC_ADDR(proc) \
egl->proc = (void *) eglGetProcAddress (#proc); egl->proc = (void *) eglGetProcAddress (#proc);
#define GET_EGL_PROC_ADDR_REQUIRED(proc) \
GET_EGL_PROC_ADDR(proc) \
if (!egl->proc) \
{ \
meta_fatal ("Failed to get proc address for '%s'\n", #proc); \
}
static void static void
meta_egl_constructed (GObject *object) meta_egl_constructed (GObject *object)
{ {
MetaEgl *egl = META_EGL (object); MetaEgl *egl = META_EGL (object);
GET_EGL_PROC_ADDR_REQUIRED (eglGetPlatformDisplayEXT); GET_EGL_PROC_ADDR (eglGetPlatformDisplayEXT);
GET_EGL_PROC_ADDR (eglCreateImageKHR); GET_EGL_PROC_ADDR (eglCreateImageKHR);
GET_EGL_PROC_ADDR (eglDestroyImageKHR); GET_EGL_PROC_ADDR (eglDestroyImageKHR);