summaryrefslogtreecommitdiff
path: root/exa
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-11-19 10:46:30 +0100
committerKeith Packard <keithp@keithp.com>2009-11-19 11:39:27 -0800
commitb8b8db98353760738eead612fe846c2ce1c174fa (patch)
treec12da437c8874b4d50cf62e01dd6a638472c7088 /exa
parentd4fc245115eb2cb323e06a82f9dd52518d9b6a16 (diff)
EXA: Don't use UploadToScreen for CopyNtoN with mixed pixmaps.
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Diffstat (limited to 'exa')
-rw-r--r--exa/exa_accel.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index 7e2dd7079..cbff7f3c0 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;