[PATCH] EXA: Don't use UploadToScreen for CopyNtoN with mixed pixmaps.

Michel Dänzer michel at daenzer.net
Thu Nov 19 01:46:30 PST 2009


From: Michel Dänzer <daenzer at vmware.com>

Signed-off-by: Michel Dänzer <daenzer at vmware.com>
---

Now with more parens.

 exa/exa_accel.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index 7e2dd70..cbff7f3 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -503,8 +503,13 @@ exaHWCopyNtoN (DrawablePtr    pSrcDrawable,
 
 	    (*pExaScr->info->DoneCopy) (pDstPixmap);
 	    exaMarkSync (pDstDrawable->pScreen);
-	/* UTS: mainly for SHM PutImage's secondary path. */
-	} else {
+	/* UTS: mainly for SHM PutImage's secondary path.
+	 *
+	 * Not taking this path for mixed pixmaps: It could only save one CPU
+	 * copy between cached memory and risks causing a more expensive
+	 * DownloadFromScreen later on.
+	 */
+	} else if (!(pExaScr->info->flags & EXA_MIXED_PIXMAPS)) {
 	    int bpp = pSrcDrawable->bitsPerPixel;
 	    int src_stride = exaGetPixmapPitch(pSrcPixmap);
 	    CARD8 *src = NULL;
@@ -531,7 +536,8 @@ exaHWCopyNtoN (DrawablePtr    pSrcDrawable,
 
 		pbox++;
 	    }
-	}
+	} else
+	    goto fallback;
     } else
 	goto fallback;
 
-- 
1.6.4.3



More information about the xorg-devel mailing list