From dc516d6e2afe7f157dbe5aad1288e5624b27e093 Mon Sep 17 00:00:00 2001 From: Chia-Wu Date: Fri, 31 Jul 2009 07:28:56 -0600 Subject: egl: Silence warnings on x86-64. Casting an unsigned int to or from a pointer directly gives warnings on x86-64. Add wrappers to silence the warnings. Signed-off-by: Chia-I Wu --- src/egl/main/egldisplay.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/egl/main/egldisplay.h') diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h index 372ed3cd79..2ef5db8a18 100644 --- a/src/egl/main/egldisplay.h +++ b/src/egl/main/egldisplay.h @@ -125,4 +125,25 @@ _eglIsSurfaceLinked(_EGLSurface *surf) } +/** + * Cast an unsigned int to a pointer. + */ +static INLINE void * +_eglUIntToPointer(unsigned int v) +{ + return (void *) ((uintptr_t) v); +} + + +/** + * Cast a pointer to an unsigned int. The pointer must be one that is + * returned by _eglUIntToPointer. + */ +static INLINE unsigned int +_eglPointerToUInt(const void *p) +{ + return (unsigned int) ((uintptr_t) p); +} + + #endif /* EGLDISPLAY_INCLUDED */ -- cgit v1.2.3 From 621801abd287238f9a3209554bc84fec5d2e9ccd Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Mon, 10 Aug 2009 14:16:32 +0800 Subject: egl: Make display and surface hash tables local. Move display and surface hash tables to egldisplay.c, and have them initialized on demand. Signed-off-by: Chia-I Wu --- src/egl/main/egldisplay.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/egl/main/egldisplay.h') diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h index 2ef5db8a18..70c59ef5e4 100644 --- a/src/egl/main/egldisplay.h +++ b/src/egl/main/egldisplay.h @@ -6,6 +6,7 @@ #endif #include "egltypedefs.h" +#include "eglhash.h" struct _egl_display @@ -26,6 +27,10 @@ struct _egl_display /* lists of linked contexts and surface */ _EGLContext *ContextList; _EGLSurface *SurfaceList; + + /* hash table to map surfaces to handles */ + _EGLHashtable *SurfaceHash; + #ifdef _EGL_PLATFORM_X Display *Xdpy; #endif -- cgit v1.2.3