diff options
author | Kristian Høgsberg <[email protected]> | 2008-03-08 19:02:10 -0500 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2008-03-08 19:10:21 -0500 |
commit | 425f9ed44e576aef27f7ab98968043f7f180d0fd (patch) | |
tree | 4ec32246623ecb9eb4d10835dca84b74d4115825 /src/glx/x11/glxext.c | |
parent | f585cb29b827104b9ea04cb11e3e3087ef1684c0 (diff) |
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.
Diffstat (limited to 'src/glx/x11/glxext.c')
-rw-r--r-- | src/glx/x11/glxext.c | 13 |
1 files changed, 5 insertions, 8 deletions
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]; |