[PATCH xserver] dix: Remove PRIVATE_DAMAGE

Adam Jackson ajax at redhat.com
Mon Mar 20 17:42:12 UTC 2017


None of this is actually wired up to anything, so we can also remove the
devPrivates from the DamageRec. The DamageExtRec is what would need
devPrivates for selinux labeling, in principle.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 dix/privates.c           | 1 -
 include/privates.h       | 1 -
 miext/damage/damage.c    | 4 ++--
 miext/damage/damagestr.h | 1 -
 4 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/dix/privates.c b/dix/privates.c
index 478f52c..9a4e611 100644
--- a/dix/privates.c
+++ b/dix/privates.c
@@ -105,7 +105,6 @@ static const char *key_names[PRIVATE_LAST] = {
     [PRIVATE_CURSOR_BITS] = "CURSOR_BITS",
 
     /* extension privates */
-    [PRIVATE_DAMAGE] = "DAMAGE",
     [PRIVATE_GLYPH] = "GLYPH",
     [PRIVATE_GLYPHSET] = "GLYPHSET",
     [PRIVATE_PICTURE] = "PICTURE",
diff --git a/include/privates.h b/include/privates.h
index a2bb1a4..e89c3e4 100644
--- a/include/privates.h
+++ b/include/privates.h
@@ -46,7 +46,6 @@ typedef enum {
     PRIVATE_CURSOR_BITS,
 
     /* extension privates */
-    PRIVATE_DAMAGE,
     PRIVATE_GLYPH,
     PRIVATE_GLYPHSET,
     PRIVATE_PICTURE,
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index a18e23b..67a9986 100644
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -1686,7 +1686,7 @@ DamageCreate(DamageReportFunc damageReport,
     damageScrPriv(pScreen);
     DamagePtr pDamage;
 
-    pDamage = dixAllocateObjectWithPrivates(DamageRec, PRIVATE_DAMAGE);
+    pDamage = calloc(1, sizeof(DamageRec));
     if (!pDamage)
         return 0;
     pDamage->pNext = 0;
@@ -1811,7 +1811,7 @@ DamageDestroy(DamagePtr pDamage)
     (*pScrPriv->funcs.Destroy) (pDamage);
     RegionUninit(&pDamage->damage);
     RegionUninit(&pDamage->pendingDamage);
-    dixFreeObjectWithPrivates(pDamage, PRIVATE_DAMAGE);
+    free(pDamage);
 }
 
 Bool
diff --git a/miext/damage/damagestr.h b/miext/damage/damagestr.h
index 2786156..0d07872 100644
--- a/miext/damage/damagestr.h
+++ b/miext/damage/damagestr.h
@@ -49,7 +49,6 @@ typedef struct _damage {
     Bool reportAfter;
     RegionRec pendingDamage;    /* will be flushed post submission at the latest */
     ScreenPtr pScreen;
-    PrivateRec *devPrivates;
 } DamageRec;
 
 typedef struct _damageScrPriv {
-- 
2.9.3



More information about the xorg-devel mailing list