summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/glx
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2010-02-04 13:16:24 +0800
committerChia-I Wu <[email protected]>2010-02-04 14:36:48 +0800
commit9a3de505dc5377a47a6ccb29fe60343feb2f5b14 (patch)
treeff22dddf5676b3223e0607b7a9b253518406184e /src/egl/drivers/glx
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/glx')
-rw-r--r--src/egl/drivers/glx/egl_glx.c29
1 files changed, 4 insertions, 25 deletions
diff --git a/src/egl/drivers/glx/egl_glx.c b/src/egl/drivers/glx/egl_glx.c
index 8e6b5b07a2f..3cbfebe4881 100644
--- a/src/egl/drivers/glx/egl_glx.c
+++ b/src/egl/drivers/glx/egl_glx.c
@@ -116,35 +116,14 @@ struct GLX_egl_config
int index;
};
-/** cast wrapper */
-static struct GLX_egl_driver *
-GLX_egl_driver(_EGLDriver *drv)
-{
- return (struct GLX_egl_driver *) drv;
-}
-
-static struct GLX_egl_display *
-GLX_egl_display(_EGLDisplay *dpy)
-{
- return (struct GLX_egl_display *) dpy->DriverData;
-}
-
-static struct GLX_egl_context *
-GLX_egl_context(_EGLContext *ctx)
-{
- return (struct GLX_egl_context *) ctx;
-}
-
-static struct GLX_egl_surface *
-GLX_egl_surface(_EGLSurface *surf)
-{
- return (struct GLX_egl_surface *) surf;
-}
+/* standard typecasts */
+_EGL_DRIVER_STANDARD_TYPECASTS(GLX_egl)
static int
GLX_egl_config_index(_EGLConfig *conf)
{
- return ((struct GLX_egl_config *) conf)->index;
+ struct GLX_egl_config *GLX_conf = GLX_egl_config(conf);
+ return GLX_conf->index;
}