diff options
Diffstat (limited to 'src/egl/drivers/glx/egl_glx.c')
-rw-r--r-- | src/egl/drivers/glx/egl_glx.c | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/src/egl/drivers/glx/egl_glx.c b/src/egl/drivers/glx/egl_glx.c index af653b86ee..3cbfebe488 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; } @@ -422,7 +401,7 @@ create_configs(_EGLDisplay *dpy, struct GLX_egl_display *GLX_dpy, EGLBoolean ok; memset(&template, 0, sizeof(template)); - _eglInitConfig(&template.Base, id); + _eglInitConfig(&template.Base, dpy, id); if (GLX_dpy->have_fbconfig) ok = convert_fbconfig(GLX_dpy->dpy, GLX_dpy->fbconfigs[i], &template); else @@ -605,7 +584,7 @@ GLX_eglCreateContext(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf, return NULL; } - if (!_eglInitContext(drv, &GLX_ctx->Base, conf, attrib_list)) { + if (!_eglInitContext(&GLX_ctx->Base, disp, conf, attrib_list)) { free(GLX_ctx); return NULL; } @@ -720,7 +699,7 @@ GLX_eglCreateWindowSurface(_EGLDriver *drv, _EGLDisplay *disp, return NULL; } - if (!_eglInitSurface(drv, &GLX_surf->Base, EGL_WINDOW_BIT, + if (!_eglInitSurface(&GLX_surf->Base, disp, EGL_WINDOW_BIT, conf, attrib_list)) { free(GLX_surf); return NULL; @@ -766,7 +745,7 @@ GLX_eglCreatePixmapSurface(_EGLDriver *drv, _EGLDisplay *disp, return NULL; } - if (!_eglInitSurface(drv, &GLX_surf->Base, EGL_PIXMAP_BIT, + if (!_eglInitSurface(&GLX_surf->Base, disp, EGL_PIXMAP_BIT, conf, attrib_list)) { free(GLX_surf); return NULL; @@ -826,7 +805,7 @@ GLX_eglCreatePbufferSurface(_EGLDriver *drv, _EGLDisplay *disp, return NULL; } - if (!_eglInitSurface(drv, &GLX_surf->Base, EGL_PBUFFER_BIT, + if (!_eglInitSurface(&GLX_surf->Base, disp, EGL_PBUFFER_BIT, conf, attrib_list)) { free(GLX_surf); return NULL; |