diff options
author | Chia-I Wu <[email protected]> | 2010-02-04 13:16:24 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2010-02-04 14:36:48 +0800 |
commit | 9a3de505dc5377a47a6ccb29fe60343feb2f5b14 (patch) | |
tree | ff22dddf5676b3223e0607b7a9b253518406184e /src/gallium | |
parent | bdb9e202de2524821bec1a136d48af70df8fb60e (diff) |
egl: Convert drivers to use typecast macros.
Use macros to define the standard typecasts. This saves lots of
typings.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/egl/common/egl_g3d.h | 39 |
1 files changed, 3 insertions, 36 deletions
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.h b/src/gallium/state_trackers/egl/common/egl_g3d.h index 3dae8c40529..5d2d9c481ab 100644 --- a/src/gallium/state_trackers/egl/common/egl_g3d.h +++ b/src/gallium/state_trackers/egl/common/egl_g3d.h @@ -87,41 +87,8 @@ struct egl_g3d_screen { const struct native_mode **native_modes; }; -static INLINE struct egl_g3d_driver * -egl_g3d_driver(_EGLDriver *drv) -{ - return (struct egl_g3d_driver *) drv; -} - -static INLINE struct egl_g3d_display * -egl_g3d_display(_EGLDisplay *dpy) -{ - /* note that it is not direct casting */ - return (struct egl_g3d_display *) dpy->DriverData; -} - -static INLINE struct egl_g3d_context * -egl_g3d_context(_EGLContext *ctx) -{ - return (struct egl_g3d_context *) ctx; -} - -static INLINE struct egl_g3d_surface * -egl_g3d_surface(_EGLSurface *surf) -{ - return (struct egl_g3d_surface *) surf; -} - -static INLINE struct egl_g3d_config * -egl_g3d_config(_EGLConfig *conf) -{ - return (struct egl_g3d_config *) conf; -} - -static INLINE struct egl_g3d_screen * -egl_g3d_screen(_EGLScreen *scr) -{ - return (struct egl_g3d_screen *) scr; -} +/* standard typecasts */ +_EGL_DRIVER_STANDARD_TYPECASTS(egl_g3d) +_EGL_DRIVER_TYPECAST(egl_g3d_screen, _EGLScreen, obj) #endif /* _EGL_G3D_H_ */ |