diff options
author | Robert Bragg <robert@linux.intel.com> | 2013-10-28 14:32:20 +0000 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2013-10-28 16:40:36 +0000 |
commit | 7c7de71f6af974c73f756e91832a27867d967152 (patch) | |
tree | 039ad303454ea36eccc0e9f0b1a86ae894368f60 | |
parent | b331ea7ec6c2180725f82e4b611587f8366fcb41 (diff) | |
download | cogl-7c7de71f6af974c73f756e91832a27867d967152.tar.gz |
egl: forward declare wl_resource for compatibility
Depending on what version of Mesa you have then eglQueryWaylandBuffer
may take a wl_buffer or wl_resource argument and the EGL header will
only forward declare the corresponding type.
The use of wl_buffer has been deprecated and so internally we assume
that eglQueryWaylandBuffer takes a wl_resource but for compatibility we
forward declare wl_resource in case we are building with EGL headers
that still use wl_buffer.
https://bugzilla.gnome.org/show_bug.cgi?id=710926
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 9bd1ee544667cfe7ecae479ec7f778446dd8f326)
-rw-r--r-- | cogl/winsys/cogl-winsys-egl-private.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cogl/winsys/cogl-winsys-egl-private.h b/cogl/winsys/cogl-winsys-egl-private.h index 8f33191d..a1dbf26e 100644 --- a/cogl/winsys/cogl-winsys-egl-private.h +++ b/cogl/winsys/cogl-winsys-egl-private.h @@ -30,6 +30,27 @@ #include "cogl-context-private.h" #include "cogl-framebuffer-private.h" +/* XXX: depending on what version of Mesa you have then + * eglQueryWaylandBuffer may take a wl_buffer or wl_resource argument + * and the EGL header will only forward declare the corresponding + * type. + * + * The use of wl_buffer has been deprecated and so internally we + * assume that eglQueryWaylandBuffer takes a wl_resource but for + * compatibility we forward declare wl_resource in case we are + * building with EGL headers that still use wl_buffer. + * + * Placing the forward declaration here means it comes before we + * #include cogl-winsys-egl-feature-functions.h bellow which + * declares lots of function pointers for accessing EGL extensions + * and cogl-winsys-egl.c will include this header before it also + * includes cogl-winsys-egl-feature-functions.h that may depend + * on this type. + */ +#ifdef EGL_WL_bind_wayland_display +struct wl_resource; +#endif + typedef struct _CoglWinsysEGLVtable { CoglBool |