[PATCH v2 6/6] Call SourceValidate even if src == dst

ville.syrjala at nokia.com ville.syrjala at nokia.com
Fri Dec 31 06:49:39 PST 2010


From: Ville Syrjälä <ville.syrjala at nokia.com>

The extra SourceValidate calls from damageCopyArea and damageCopyPlane
can be removed.

Signed-off-by: Ville Syrjälä <ville.syrjala at nokia.com>
---
 hw/xfree86/xaa/xaaBitBlt.c |    3 +--
 mi/micopy.c                |    3 +--
 miext/damage/damage.c      |   22 ----------------------
 3 files changed, 2 insertions(+), 26 deletions(-)

diff --git a/hw/xfree86/xaa/xaaBitBlt.c b/hw/xfree86/xaa/xaaBitBlt.c
index dfe51ea..049dbfb 100644
--- a/hw/xfree86/xaa/xaaBitBlt.c
+++ b/hw/xfree86/xaa/xaaBitBlt.c
@@ -54,8 +54,7 @@ XAABitBlt(
     origDest.x = dstx;
     origDest.y = dsty;
 
-    if((pSrcDrawable != pDstDrawable) && 
-			pSrcDrawable->pScreen->SourceValidate) {
+    if (pSrcDrawable->pScreen->SourceValidate) {
 	(*pSrcDrawable->pScreen->SourceValidate) (
 			pSrcDrawable, srcx, srcy, width, height,
 			pGC->subWindowMode);
diff --git a/mi/micopy.c b/mi/micopy.c
index 50e2667..652c620 100644
--- a/mi/micopy.c
+++ b/mi/micopy.c
@@ -183,8 +183,7 @@ miDoCopy (DrawablePtr	pSrcDrawable,
 	return NULL;
     }
 
-    if ((pSrcDrawable != pDstDrawable) &&
-	pSrcDrawable->pScreen->SourceValidate)
+    if (pSrcDrawable->pScreen->SourceValidate)
     {
 	(*pSrcDrawable->pScreen->SourceValidate) (pSrcDrawable, xIn, yIn, widthSrc, heightSrc,
 						  pGC->subWindowMode);
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index d0e0fe4..566995c 100644
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -891,17 +891,6 @@ damageCopyArea(DrawablePtr   pSrc,
     RegionPtr ret;
     DAMAGE_GC_OP_PROLOGUE(pGC, pDst);
     
-    /* The driver will only call SourceValidate() when pSrc != pDst,
-     * but the software sprite (misprite.c) always need to know when a
-     * drawable is copied so it can remove the sprite. See #1030. */
-    if ((pSrc == pDst) && pSrc->pScreen->SourceValidate &&
-	pSrc->type == DRAWABLE_WINDOW &&
-	((WindowPtr)pSrc)->viewable)
-    {
-	(*pSrc->pScreen->SourceValidate) (pSrc, srcx, srcy, width, height,
-					  pGC->subWindowMode);
-    }
-    
     if (checkGCDamage (pDst, pGC))
     {
 	BoxRec box;
@@ -938,17 +927,6 @@ damageCopyPlane(DrawablePtr	pSrc,
     RegionPtr ret;
     DAMAGE_GC_OP_PROLOGUE(pGC, pDst);
 
-    /* The driver will only call SourceValidate() when pSrc != pDst,
-     * but the software sprite (misprite.c) always need to know when a
-     * drawable is copied so it can remove the sprite. See #1030. */
-    if ((pSrc == pDst) && pSrc->pScreen->SourceValidate &&
-	pSrc->type == DRAWABLE_WINDOW &&
-	((WindowPtr)pSrc)->viewable)
-    {
-	(*pSrc->pScreen->SourceValidate) (pSrc, srcx, srcy, width, height,
-					  pGC->subWindowMode);
-    }
-
     if (checkGCDamage (pDst, pGC))
     {
 	BoxRec box;
-- 
1.7.2.2



More information about the xorg-devel mailing list