diff options
author | Kristian Høgsberg <[email protected]> | 2008-03-08 19:15:50 -0500 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2008-03-08 19:15:50 -0500 |
commit | a1ea6f6198d80f716936a308cfab235f18a014e1 (patch) | |
tree | 81f3ad6b1c4faf31958b6eca098e2bb4bb113597 /src/glx/x11/dri_glx.c | |
parent | 425f9ed44e576aef27f7ab98968043f7f180d0fd (diff) |
Convert driCreateScreen and driDestroyScreen to function pointers.
We avoid leaking the symbols and will be able to replace them with
DRI2 implementation later on.
Diffstat (limited to 'src/glx/x11/dri_glx.c')
-rw-r--r-- | src/glx/x11/dri_glx.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c index fd824f386da..194517a6577 100644 --- a/src/glx/x11/dri_glx.c +++ b/src/glx/x11/dri_glx.c @@ -657,9 +657,20 @@ CallCreateNewScreen(Display *dpy, int scrn, __GLXscreenConfigs *psc, return psp; } -void -driCreateScreen(__GLXscreenConfigs *psc, int screen, - __GLXdisplayPrivate *priv) +static void driDestroyScreen(__GLXscreenConfigs *psc) +{ + /* Free the direct rendering per screen data */ + if (psc->driScreen.private) + (*psc->driScreen.destroyScreen)(&psc->driScreen); + psc->driScreen.private = NULL; + if (psc->drawHash) + __glxHashDestroy(psc->drawHash); + if (psc->driver) + dlclose(psc->driver); +} + +static void driCreateScreen(__GLXscreenConfigs *psc, int screen, + __GLXdisplayPrivate *priv) { PFNCREATENEWSCREENFUNC createNewScreen; __GLXDRIdisplayPrivate *pdp; @@ -685,18 +696,8 @@ driCreateScreen(__GLXscreenConfigs *psc, int screen, CallCreateNewScreen(psc->dpy, screen, psc, pdp, createNewScreen); if (psc->driScreen.private != NULL) __glXScrEnableDRIExtension(psc); -} -void driDestroyScreen(__GLXscreenConfigs *psc) -{ - /* Free the direct rendering per screen data */ - if (psc->driScreen.private) - (*psc->driScreen.destroyScreen)(&psc->driScreen); - psc->driScreen.private = NULL; - if (psc->drawHash) - __glxHashDestroy(psc->drawHash); - if (psc->driver) - dlclose(psc->driver); + psc->driDestroyScreen = driDestroyScreen; } /* Called from __glXFreeDisplayPrivate. @@ -735,6 +736,7 @@ __GLXDRIdisplay *driCreateDisplay(Display *dpy) pdpyp->driPatch = patch; pdpyp->base.destroyDisplay = driDestroyDisplay; + pdpyp->base.createScreen = driCreateScreen; return (void *)pdpyp; } |