summaryrefslogtreecommitdiff
path: root/src/egl/drivers/xdri
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2010-02-04 13:16:24 +0800
committerChia-I Wu <olvaffe@gmail.com>2010-02-04 14:36:48 +0800
commit9a3de505dc5377a47a6ccb29fe60343feb2f5b14 (patch)
treeff22dddf5676b3223e0607b7a9b253518406184e /src/egl/drivers/xdri
parentbdb9e202de2524821bec1a136d48af70df8fb60e (diff)
egl: Convert drivers to use typecast macros.
Use macros to define the standard typecasts. This saves lots of typings.
Diffstat (limited to 'src/egl/drivers/xdri')
-rw-r--r--src/egl/drivers/xdri/egl_xdri.c42
1 files changed, 6 insertions, 36 deletions
diff --git a/src/egl/drivers/xdri/egl_xdri.c b/src/egl/drivers/xdri/egl_xdri.c
index 68e659eb27..555473c00a 100644
--- a/src/egl/drivers/xdri/egl_xdri.c
+++ b/src/egl/drivers/xdri/egl_xdri.c
@@ -112,43 +112,13 @@ struct xdri_egl_config
-/** cast wrapper */
-static INLINE struct xdri_egl_driver *
-xdri_egl_driver(_EGLDriver *drv)
-{
- return (struct xdri_egl_driver *) drv;
-}
-
+/* standard typecasts */
+_EGL_DRIVER_STANDARD_TYPECASTS(xdri_egl)
-static INLINE struct xdri_egl_display *
-lookup_display(_EGLDisplay *dpy)
-{
- return (struct xdri_egl_display *) dpy->DriverData;
-}
-
-
-/** Map EGLSurface handle to xdri_egl_surface object */
-static INLINE struct xdri_egl_surface *
-lookup_surface(_EGLSurface *surface)
-{
- return (struct xdri_egl_surface *) surface;
-}
-
-
-/** Map EGLContext handle to xdri_egl_context object */
-static INLINE struct xdri_egl_context *
-lookup_context(_EGLContext *context)
-{
- return (struct xdri_egl_context *) context;
-}
-
-
-/** Map EGLConfig handle to xdri_egl_config object */
-static INLINE struct xdri_egl_config *
-lookup_config(_EGLConfig *conf)
-{
- return (struct xdri_egl_config *) conf;
-}
+#define lookup_display(dpy) xdri_egl_display(dpy)
+#define lookup_context(ctx) xdri_egl_context(ctx)
+#define lookup_surface(surf) xdri_egl_surface(surf)
+#define lookup_config(conf) xdri_egl_config(conf)
/** Get size of given window */