From 425f9ed44e576aef27f7ab98968043f7f180d0fd Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Sat, 8 Mar 2008 19:02:10 -0500 Subject: Abstract __DRIdisplayPrivateRec away in dri_glx.c. This patch moves __DRIdisplayPrivateRec definition into dri_glx.c and let's dri_glx.c allocate the __DRIdisplay struct pointer to from __GLXdisplayPrivate. A small step towards moving more of the dri functionality into dri_glx.c. --- src/glx/x11/glxext.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/glx/x11/glxext.c') diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c index 632da2d84a7..b4a03e40577 100644 --- a/src/glx/x11/glxext.c +++ b/src/glx/x11/glxext.c @@ -63,7 +63,6 @@ #include "xf86dri.h" #include "xf86drm.h" #include "sarea.h" -#include "dri_glx.h" #endif #ifdef USE_XCB @@ -377,10 +376,9 @@ static int __glXFreeDisplayPrivate(XExtData *extension) #ifdef GLX_DIRECT_RENDERING /* Free the direct rendering per display data */ - if (priv->driDisplay.private) - (*priv->driDisplay.destroyDisplay)(priv->dpy, - priv->driDisplay.private); - priv->driDisplay.private = NULL; + if (priv->driDisplay) + (*priv->driDisplay->destroyDisplay)(priv->driDisplay); + priv->driDisplay = NULL; #endif Xfree((char*) priv); @@ -864,8 +862,7 @@ __GLXdisplayPrivate *__glXInitialize(Display* dpy) ** (e.g., those called in AllocAndFetchScreenConfigs). */ if (getenv("LIBGL_ALWAYS_INDIRECT") == NULL) { - dpyPriv->driDisplay.private = - driCreateDisplay(dpy, &dpyPriv->driDisplay); + dpyPriv->driDisplay = driCreateDisplay(dpy); } #endif @@ -1189,7 +1186,7 @@ FetchDRIDrawable( Display *dpy, GLXDrawable drawable, GLXContext gc) drm_drawable_t hwDrawable; void *empty_attribute_list = NULL; - if (priv == NULL || priv->driDisplay.private == NULL) + if (priv == NULL || priv->driDisplay == NULL) return NULL; sc = &priv->screenConfigs[gc->screen]; -- cgit v1.2.3