summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorldelgass <ldelgass>2003-02-16 02:00:05 +0000
committerldelgass <ldelgass>2003-02-16 02:00:05 +0000
commit0acca64be6f15120671d86947ce20f69659549b7 (patch)
tree016ddaaeb323b71355febce10a4ef5ef3ad86eee
parent248335a794449287f1590de50936232fe037557a (diff)
Sync with XFree86 cvs (drawable fix, pBackClipRects leak fix)mesa-4-0-4-20030216
-rw-r--r--xc/lib/GL/dri/dri_util.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/xc/lib/GL/dri/dri_util.c b/xc/lib/GL/dri/dri_util.c
index 2c6d6259d..976a4003e 100644
--- a/xc/lib/GL/dri/dri_util.c
+++ b/xc/lib/GL/dri/dri_util.c
@@ -612,7 +612,8 @@ __driUtilUpdateDrawableInfo(Display *dpy, int scrn,
DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID);
- if (!XF86DRIGetDrawableInfo(dpy, scrn, pdp->draw,
+ if (!__driFindDrawable(psp->drawHash, pdp->draw) ||
+ !XF86DRIGetDrawableInfo(dpy, scrn, pdp->draw,
&pdp->index, &pdp->lastStamp,
&pdp->x, &pdp->y, &pdp->w, &pdp->h,
&pdp->numClipRects, &pdp->pClipRects,
@@ -628,7 +629,7 @@ __driUtilUpdateDrawableInfo(Display *dpy, int scrn,
pdp->numClipRects = 0;
pdp->pClipRects = NULL;
pdp->numBackClipRects = 0;
- pdp->pBackClipRects = 0;
+ pdp->pBackClipRects = NULL;
}
else
pdp->pStamp = &(psp->pSAREA->drawableTable[pdp->index].stamp);
@@ -739,8 +740,14 @@ static void driDestroyDrawable(Display *dpy, void *drawablePrivate)
(*psp->DriverAPI.DestroyBuffer)(pdp);
if (__driWindowExists(dpy, pdp->draw))
(void)XF86DRIDestroyDrawable(dpy, scrn, pdp->draw);
- if (pdp->pClipRects)
+ if (pdp->pClipRects) {
Xfree(pdp->pClipRects);
+ pdp->pClipRects = NULL;
+ }
+ if (pdp->pBackClipRects) {
+ Xfree(pdp->pBackClipRects);
+ pdp->pBackClipRects = NULL;
+ }
Xfree(pdp);
}
}