From b8b8db98353760738eead612fe846c2ce1c174fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Thu, 19 Nov 2009 10:46:30 +0100 Subject: [PATCH] EXA: Don't use UploadToScreen for CopyNtoN with mixed pixmaps. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michel Dänzer --- exa/exa_accel.c | 12 +++++++++--- 1 file 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;