From 161624a5a45808fd56141dc2c64be729944f03ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Tue, 10 Jul 2007 09:02:40 +0200 Subject: [PATCH] GLX: Only build code dealing with GLXPixmap damage field when DRI is enabled. --- GL/glx/glxcmds.c | 2 ++ GL/glx/glxext.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/GL/glx/glxcmds.c b/GL/glx/glxcmds.c index ed5c138b4..3038b131f 100644 --- a/GL/glx/glxcmds.c +++ b/GL/glx/glxcmds.c @@ -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; diff --git a/GL/glx/glxext.c b/GL/glx/glxext.c index b4f3105aa..b35175ed2 100644 --- a/GL/glx/glxext.c +++ b/GL/glx/glxext.c @@ -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.