[PATCH 06/12] damage: Remove the 'damage window' resource type.

Adam Jackson ajax at redhat.com
Tue Oct 16 11:56:19 PDT 2012


Note that the existing code never actually creates a resource of this
type, so it can't possibly do anything.  This is clearly meant to track
window destruction and clean up any associated Damages, but that's
already handled by miext/damage's DestroyWindow wrapper.

Previous discussion:
http://lists.freedesktop.org/archives/xorg-devel/2011-March/020847.html

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 damageext/damageext.c | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/damageext/damageext.c b/damageext/damageext.c
index a942ffa..e02a28f 100644
--- a/damageext/damageext.c
+++ b/damageext/damageext.c
@@ -31,7 +31,6 @@
 static unsigned char DamageReqCode;
 static int DamageEventBase;
 static RESTYPE DamageExtType;
-static RESTYPE DamageExtWinType;
 
 static DevPrivateKeyRec DamageClientPrivateKeyRec;
 
@@ -429,8 +428,6 @@ FreeDamageExt(pointer value, XID did)
      * Get rid of the resource table entry hanging from the window id
      */
     pDamageExt->id = 0;
-    if (WindowDrawable(pDamageExt->pDrawable->type))
-        FreeResourceByType(pDamageExt->pDrawable->id, DamageExtWinType, TRUE);
     if (pDamageExt->pDamage) {
         DamageUnregister(pDamageExt->pDrawable, pDamageExt->pDamage);
         DamageDestroy(pDamageExt->pDamage);
@@ -439,16 +436,6 @@ FreeDamageExt(pointer value, XID did)
     return Success;
 }
 
-static int
-FreeDamageExtWin(pointer value, XID wid)
-{
-    DamageExtPtr pDamageExt = (DamageExtPtr) value;
-
-    if (pDamageExt->id)
-        FreeResource(pDamageExt->id, RT_NONE);
-    return Success;
-}
-
 static void
 SDamageNotifyEvent(xDamageNotifyEvent * from, xDamageNotifyEvent * to)
 {
@@ -479,10 +466,6 @@ DamageExtensionInit(void)
     if (!DamageExtType)
         return;
 
-    DamageExtWinType = CreateNewResourceType(FreeDamageExtWin, "DamageExtWin");
-    if (!DamageExtWinType)
-        return;
-
     if (!dixRegisterPrivateKey
         (&DamageClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(DamageClientRec)))
         return;
-- 
1.7.12.1



More information about the xorg-devel mailing list