Module: Mesa
Branch: master
Commit: 31c7d4ec188b6f25a23a3eb9a3e05e103792aa4d
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=31c7d4ec188b6f25a23a3eb9a3e05e103792aa4d

Author: Eric Anholt <e...@anholt.net>
Date:   Tue Sep 25 10:09:12 2012 -0700

egl: Cleanly cast EGLNative* pointers to X11 types.

The EGLNative* types are all defined to be pointers across all our EGL
implementations, but in the X11 platform they're actually just XIDs (32-bit
integers).

Reviewed-by: Chad Versace <chad.vers...@linux.intel.com>

---

 src/egl/drivers/dri2/platform_x11.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/egl/drivers/dri2/platform_x11.c 
b/src/egl/drivers/dri2/platform_x11.c
index 44e4373..15013ec 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -175,7 +175,7 @@ swrastGetImage(__DRIdrawable * read,
  */
 static _EGLSurface *
 dri2_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
-                   _EGLConfig *conf, EGLNativeWindowType window,
+                   _EGLConfig *conf, EGLNativeWindowType native_window,
                    const EGLint *attrib_list)
 {
    struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
@@ -185,6 +185,7 @@ dri2_create_surface(_EGLDriver *drv, _EGLDisplay *disp, 
EGLint type,
    xcb_get_geometry_reply_t *reply;
    xcb_screen_iterator_t s;
    xcb_generic_error_t *error;
+   xcb_drawable_t window = (uintptr_t )native_window;
 
    (void) drv;
 
@@ -831,11 +832,12 @@ dri2_swap_interval(_EGLDriver *drv, _EGLDisplay *disp, 
_EGLSurface *surf, EGLint
 
 static EGLBoolean
 dri2_copy_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
-                 EGLNativePixmapType target)
+                 EGLNativePixmapType native_target)
 {
    struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
    struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
    xcb_gcontext_t gc;
+   xcb_pixmap_t target = (uintptr_t )native_target;
 
    (void) drv;
 

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to