[PATCH 1/3] damage: Remove isWindow from the DamageRec
Adam Jackson
ajax at redhat.com
Wed Sep 11 14:26:49 PDT 2013
There's no good reason to waste memory on this, we're already stashing a
pointer to the drawable.
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
miext/damage/damage.c | 6 +-----
miext/damage/damagestr.h | 1 -
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index cc02991..63fe89a 100644
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -1469,7 +1469,7 @@ damageDestroyPixmap(PixmapPtr pPixmap)
while ((pDamage = *pPrev)) {
damageRemoveDamage(pPrev, pDamage);
- if (!pDamage->isWindow)
+ if (pDamage->pDrawable->type == DRAWABLE_WINDOW)
DamageDestroy(pDamage);
}
}
@@ -1700,7 +1700,6 @@ DamageCreate(DamageReportFunc damageReport,
pDamage->damageLevel = damageLevel;
pDamage->isInternal = isInternal;
pDamage->closure = closure;
- pDamage->isWindow = FALSE;
pDamage->pDrawable = 0;
pDamage->reportAfter = FALSE;
@@ -1743,10 +1742,7 @@ DamageRegister(DrawablePtr pDrawable, DamagePtr pDamage)
#endif
pDamage->pNextWin = *pPrev;
*pPrev = pDamage;
- pDamage->isWindow = TRUE;
}
- else
- pDamage->isWindow = FALSE;
pDamage->pDrawable = pDrawable;
damageInsertDamage(getDrawableDamageRef(pDrawable), pDamage);
(*pScrPriv->funcs.Register) (pDrawable, pDamage);
diff --git a/miext/damage/damagestr.h b/miext/damage/damagestr.h
index 36753ee..eb50482 100644
--- a/miext/damage/damagestr.h
+++ b/miext/damage/damagestr.h
@@ -40,7 +40,6 @@ typedef struct _damage {
DamageReportLevel damageLevel;
Bool isInternal;
void *closure;
- Bool isWindow;
DrawablePtr pDrawable;
DamageReportFunc damageReport;
--
1.8.3.1
More information about the xorg-devel
mailing list