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;
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.
pdpyp->driPatch = patch;
pdpyp->base.destroyDisplay = driDestroyDisplay;
+ pdpyp->base.createScreen = driCreateScreen;
return (void *)pdpyp;
}
* Method to destroy the private DRI display data.
*/
void (*destroyDisplay)(__GLXDRIdisplay *display);
+
+ void (*createScreen)(__GLXscreenConfigs *psc, int screen,
+ __GLXdisplayPrivate *priv);
};
/*
** dependent methods.
*/
extern __GLXDRIdisplay *driCreateDisplay(Display *dpy);
-extern void driCreateScreen(__GLXscreenConfigs *psc, int screen,
- __GLXdisplayPrivate *priv);
-extern void driDestroyScreen(__GLXscreenConfigs *psc);
extern void DRI_glXUseXFont( Font font, int first, int count, int listbase );
int scr;
void *driver;
+ void (*driDestroyScreen)(__GLXscreenConfigs *psc);
+
#ifdef __DRI_COPY_SUB_BUFFER
__DRIcopySubBufferExtension *copySubBuffer;
#endif
Xfree((char*) psc->serverGLXexts);
#ifdef GLX_DIRECT_RENDERING
- driDestroyScreen(psc);
+ psc->driDestroyScreen(psc);
#endif
}
XFree((char*) priv->screenConfigs);
psc->scr = i;
psc->dpy = dpy;
#ifdef GLX_DIRECT_RENDERING
- driCreateScreen(psc, i, priv);
+ (*priv->driDisplay->createScreen)(psc, i, priv);
#endif
}
SyncHandle();