[PATCH 3/3] Make EGL/GLESv2 dependencies optional

David Herrmann dh.herrmann at googlemail.com
Thu Jan 10 14:33:15 PST 2013


On Wed, Jan 9, 2013 at 10:44 AM, Vasily Khoruzhick <anarsoul at gmail.com> wrote:
> On Wed, Jan 9, 2013 at 12:03 AM, Vasily Khoruzhick <anarsoul at gmail.com> wrote:
>> On Wed, Jan 9, 2013 at 12:01 AM, John Kåre Alsaker
>> <john.kare.alsaker at gmail.com> wrote:
>>> EGLDisplay, EGLSurface, EGLNativeDisplayType and EGLNativeWindowType
>>> should all be void *. With that change you can get rid of the ugly
>>> typecasts.
> xcb_window_t is uint32_t (see xproto.h), and it's passed as
> EGLNativeWindowType in compositor-x11.c,
> so if EGLNativeWindowType is void * I'm getting this warning:
> compositor-x11.c: In function 'x11_compositor_create_output':
> compositor-x11.c:887:3: warning: passing argument 2 of
> 'gl_renderer_output_create' makes pointer from integer without a cast
> [enabled by default]
> In file included from compositor-x11.c:52:0:
> gl-renderer.h:78:1: note: expected 'EGLNativeWindowType' but argument
> is of type 'xcb_window_t'

First of all you cannot use EGLNativeWindowType but allow
--disable-egl. This doesn't work. Either add a build-time dependency
to EGL but don't link if --disable-egl is passed or don't use EGL
types at all. I think both is ok but the latter one should probably be
And use void* as type but add the appropriate casts to
compositor-x11.c, that is, change the EGLNativeWindowType casts to
(void*). But as far as I know the ABI uses void* as type so the
uint32_t thingy might break ABI on 64bit systems. I wonder how that is
supposed to work without casts.


More information about the wayland-devel mailing list