On Fri, Jan 11, 2013 at 1:33 AM, David Herrmann <[email protected]> wrote: > Hi > > On Wed, Jan 9, 2013 at 10:44 AM, Vasily Khoruzhick <[email protected]> wrote: >> On Wed, Jan 9, 2013 at 12:03 AM, Vasily Khoruzhick <[email protected]> >> wrote: >>> On Wed, Jan 9, 2013 at 12:01 AM, John Kåre Alsaker >>> <[email protected]> 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.
Why? It already works. I can just typedef missing types (because EGL/egl.h is included only if ENABLE_EGL is defined) > 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 > preferred. > 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. See EGL/eglplatform.h, EGLNativeWindowType depends on platform, for X11 it's Window, for Win32 it's HWND, for wayland it's struct wl_egl_window *, for some platforms it's void *. > Regards > David > _______________________________________________ > wayland-devel mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/wayland-devel _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
