GLX: Only build code dealing with GLXPixmap damage field when DRI is enabled.

This commit is contained in:
Michel Dänzer 2007-07-10 09:02:40 +02:00
parent 4abd00dab7
commit 161624a5a4
2 changed files with 4 additions and 0 deletions

View File

@ -1285,7 +1285,9 @@ int DoCreateGLXPixmap(__GLXclientState *cl, XID fbconfigId,
pGlxPixmap->pGlxScreen = __glXgetActiveScreen(screenNum);
pGlxPixmap->pScreen = pDraw->pScreen;
pGlxPixmap->idExists = True;
#ifdef XF86DRI
pGlxPixmap->pDamage = NULL;
#endif
pGlxPixmap->refcnt = 0;
pGlxPixmap->modes = modes;

View File

@ -172,10 +172,12 @@ static int PixmapGone(__GLXpixmap *pGlxPixmap, XID id)
pGlxPixmap->idExists = False;
if (!pGlxPixmap->refcnt) {
#ifdef XF86DRI
if (pGlxPixmap->pDamage) {
DamageUnregister (pGlxPixmap->pDraw, pGlxPixmap->pDamage);
DamageDestroy(pGlxPixmap->pDamage);
}
#endif
/*
** The DestroyPixmap routine should decrement the refcount and free
** only if it's zero.