[PATCH v2 04/12] composite: Remove unnecessary variable.

Pauli ext-pauli.nieminen at nokia.com
Thu Dec 30 09:19:35 PST 2010


From: Pauli Nieminen <ext-pauli.nieminen at nokia.com>

We know that there is damage if the dynamic block handler is registered.

Signed-off-by: Pauli Nieminen <ext-pauli.nieminen at nokia.com>
---
 composite/compalloc.c |   12 ++----------
 composite/compinit.c  |    1 -
 composite/compint.h   |    1 -
 3 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/composite/compalloc.c b/composite/compalloc.c
index e628c45..86a6f8e 100644
--- a/composite/compalloc.c
+++ b/composite/compalloc.c
@@ -50,14 +50,8 @@
 static void
 compScreenUpdate (ScreenPtr pScreen)
 {
-    CompScreenPtr   cs = GetCompScreen (pScreen);
-
     compCheckTree (pScreen);
-    if (cs->damaged)
-    {
-	compWindowUpdate (pScreen->root);
-	cs->damaged = FALSE;
-    }
+    compWindowUpdate (pScreen->root);
 }
 
 static void
@@ -85,11 +79,9 @@ compReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure)
     CompScreenPtr   cs = GetCompScreen (pScreen);
     CompWindowPtr   cw = GetCompWindow (pWin);
 
-    if (!cs->damaged) {
+    if (!cs->BlockHandler) {
         cs->BlockHandler = pScreen->BlockHandler;
         pScreen->BlockHandler = compBlockHandler;
-
-        cs->damaged = TRUE;
     }
     cw->damaged = TRUE;
 }
diff --git a/composite/compinit.c b/composite/compinit.c
index 885cc73..276ed75 100644
--- a/composite/compinit.c
+++ b/composite/compinit.c
@@ -301,7 +301,6 @@ compScreenInit (ScreenPtr pScreen)
     if (!cs)
 	return FALSE;
 
-    cs->damaged = FALSE;
     cs->overlayWid = FakeClientID(0);
     cs->pOverlayWin = NULL;
     cs->pOverlayClients = NULL;
diff --git a/composite/compint.h b/composite/compint.h
index 9ba5dd0..4b058e7 100644
--- a/composite/compint.h
+++ b/composite/compint.h
@@ -152,7 +152,6 @@ typedef struct _CompScreen {
 
     ScreenBlockHandlerProcPtr	BlockHandler;
     CloseScreenProcPtr		CloseScreen;
-    Bool			damaged;
     int				numAlternateVisuals;
     VisualID			*alternateVisuals;
 
-- 
1.7.0.4



More information about the xorg-devel mailing list