diff --git a/exa/exa_accel.c b/exa/exa_accel.c index 39f3437..5f323e4 100644 --- a/exa/exa_accel.c +++ b/exa/exa_accel.c @@ -394,6 +394,7 @@ exaHWCopyNtoN (DrawablePtr pSrcDrawable, if (rects) { int i; + int ordering; for (i = 0; i < nbox; i++) { rects[i].x = pbox[i].x1 + dx + src_off_x; @@ -402,7 +403,14 @@ exaHWCopyNtoN (DrawablePtr pSrcDrawable, rects[i].height = pbox[i].y2 - pbox[i].y1; } - srcregion = RECTS_TO_REGION(pScreen, nbox, rects, CT_YXBANDED); + if (upsidedown) + ordering = CT_UNSORTED; + else if (reverse) + ordering = CT_YSORTED; + else + ordering = CT_YXSORTED; + + srcregion = RECTS_TO_REGION(pScreen, nbox, rects, ordering); xfree(rects); if (!pGC || !exaGCReadsDestination(pDstDrawable, pGC->planemask, @@ -459,8 +467,7 @@ exaHWCopyNtoN (DrawablePtr pSrcDrawable, exaDoMigration (pixmaps, 2, TRUE); /* Mixed directions must be handled specially if the card is lame */ - if ((pExaScr->info->flags & EXA_TWO_BITBLT_DIRECTIONS) && - reverse != upsidedown) { + if ((pExaScr->info->flags & EXA_TWO_BITBLT_DIRECTIONS) && (dx ^ dy) < 0) { if (exaCopyNtoNTwoDir(pSrcDrawable, pDstDrawable, pGC, pbox, nbox, dx, dy)) goto out; @@ -470,8 +477,7 @@ exaHWCopyNtoN (DrawablePtr pSrcDrawable, if (exaPixmapIsOffscreen(pDstPixmap)) { /* Normal blitting. */ if (exaPixmapIsOffscreen(pSrcPixmap)) { - if (!(*pExaScr->info->PrepareCopy) (pSrcPixmap, pDstPixmap, reverse ? -1 : 1, - upsidedown ? -1 : 1, + if (!(*pExaScr->info->PrepareCopy) (pSrcPixmap, pDstPixmap, dx, dy, pGC ? pGC->alu : GXcopy, pGC ? pGC->planemask : FB_ALLONES)) { goto fallback;