summaryrefslogtreecommitdiff
path: root/src/glx/x11/glxext.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@hinata.boston.redhat.com>2007-05-11 16:43:20 -0400
committerKristian Høgsberg <krh@redhat.com>2007-10-10 18:00:18 -0400
commit5987a03f994af2bb413d1cf984ab01aa095c0943 (patch)
tree55dc5d3b0c8bbbbfbd42d4824bcdde3740cc654b /src/glx/x11/glxext.c
parentaac367f48afc62176faf67aa6f329fbeae2004b4 (diff)
Convert all DRI entrypoints to take pointers to __DRI* types.
The entrypoints take a mix of __DRIscreen * and void * (screen private) arguments (similarly for contexts and drawables). This patch does away with passing the private void pointer and always only passes the fully typed __DRIscreen pointer and always as the first argument. This makes the interface more consistent and increases type safety, and catches a bug where we would pass a screen private to DRIdrawable::getSBC.
Diffstat (limited to 'src/glx/x11/glxext.c')
-rw-r--r--src/glx/x11/glxext.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c
index 45b1dde91b..8c12ae254a 100644
--- a/src/glx/x11/glxext.c
+++ b/src/glx/x11/glxext.c
@@ -360,7 +360,7 @@ static void FreeScreenConfigs(__GLXdisplayPrivate *priv)
#ifdef GLX_DIRECT_RENDERING
/* Free the direct rendering per screen data */
if (psc->driScreen.private)
- (*psc->driScreen.destroyScreen)(psc->driScreen.private);
+ (*psc->driScreen.destroyScreen)(&psc->driScreen);
psc->driScreen.private = NULL;
__glxHashDestroy(psc->drawHash);
#endif
@@ -1656,7 +1656,7 @@ FetchDRIDrawable( Display *dpy, GLXDrawable drawable, GLXContext gc)
}
if (__glxHashInsert(sc->drawHash, drawable, pdraw)) {
- (*pdraw->driDrawable.destroyDrawable)(pdraw->driDrawable.private);
+ (*pdraw->driDrawable.destroyDrawable)(&pdraw->driDrawable);
XF86DRIDestroyDrawable(dpy, sc->scr, drawable);
Xfree(pdraw);
return NULL;
@@ -1671,7 +1671,7 @@ static Bool BindContextWrapper( Display *dpy, GLXContext gc,
__DRIdrawable *pdraw = FetchDRIDrawable(dpy, draw, gc);
__DRIdrawable *pread = FetchDRIDrawable(dpy, read, gc);
- return (*gc->driContext.bindContext)(pdraw, pread, &gc->driContext);
+ return (*gc->driContext.bindContext)(&gc->driContext, pdraw, pread);
}
@@ -1789,7 +1789,7 @@ USED static Bool MakeContextCurrent(Display *dpy, GLXDrawable draw,
if (oldGC->isDirect) {
if (oldGC->driContext.private) {
(*oldGC->driContext.destroyContext)
- (oldGC->driContext.private);
+ (&oldGC->driContext);
XF86DRIDestroyContext(oldGC->createDpy,
oldGC->psc->scr,
gc->hwContextID);