[PATCH 2/2] Damage: Add devPrivates to DamageRec

Aaron Plattner aplattner at nvidia.com
Fri Jul 17 15:10:46 PDT 2009


---
 miext/damage/damage.c    |    3 +++
 miext/damage/damagestr.h |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index 2c78134..b7ec92a 100644
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -1953,6 +1953,7 @@ DamageCreate (DamageReportFunc  damageReport,
     pDamage->damageDestroy = damageDestroy;
     pDamage->damageMarker = NULL;
     pDamage->pScreen = pScreen;
+    pDamage->devPrivates = NULL;
 
     (*pScrPriv->funcs.Create) (pDamage);
 
@@ -2056,6 +2057,8 @@ DamageDestroy (DamagePtr    pDamage)
     if (pDamage->damageDestroy)
 	(*pDamage->damageDestroy) (pDamage, pDamage->closure);
     (*pScrPriv->funcs.Destroy) (pDamage);
+    dixFreePrivates(pDamage->devPrivates);
+    pDamage->devPrivates = NULL;
     REGION_UNINIT (pScreen, &pDamage->damage);
     REGION_UNINIT (pScreen, &pDamage->pendingDamage);
     xfree (pDamage);
diff --git a/miext/damage/damagestr.h b/miext/damage/damagestr.h
index 812075a..d7435b2 100644
--- a/miext/damage/damagestr.h
+++ b/miext/damage/damagestr.h
@@ -54,6 +54,7 @@ typedef struct _damage {
     RegionRec		pendingDamage; /* will be flushed post submission at the latest */
     RegionRec		backupDamage; /* for use with damageMarker */
     ScreenPtr		pScreen;
+    PrivateRec		*devPrivates;
 } DamageRec;
 
 typedef struct _damageScrPriv {
-- 
1.6.0.4



More information about the xorg-devel mailing list