mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 17:30:02 +01:00
EXA: Only pass CT_YXBANDED to RECTS_TO_REGION() if that is really true.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=22642 .
(cherry picked from commit 3575854481)
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
b10c4fe343
commit
ec60f4ca65
1 changed files with 11 additions and 1 deletions
|
|
@ -415,6 +415,7 @@ exaCopyNtoN (DrawablePtr pSrcDrawable,
|
||||||
|
|
||||||
if (rects) {
|
if (rects) {
|
||||||
int i;
|
int i;
|
||||||
|
int ordering;
|
||||||
|
|
||||||
for (i = 0; i < nbox; i++) {
|
for (i = 0; i < nbox; i++) {
|
||||||
rects[i].x = pbox[i].x1 + dx + src_off_x;
|
rects[i].x = pbox[i].x1 + dx + src_off_x;
|
||||||
|
|
@ -423,7 +424,16 @@ exaCopyNtoN (DrawablePtr pSrcDrawable,
|
||||||
rects[i].height = pbox[i].y2 - pbox[i].y1;
|
rects[i].height = pbox[i].y2 - pbox[i].y1;
|
||||||
}
|
}
|
||||||
|
|
||||||
srcregion = RECTS_TO_REGION(pScreen, nbox, rects, CT_YXBANDED);
|
/* This must match the miRegionCopy() logic for reversing rect order */
|
||||||
|
if (nbox == 1 || (dx > 0 && dy > 0) ||
|
||||||
|
(pDstDrawable != pSrcDrawable &&
|
||||||
|
(pDstDrawable->type != DRAWABLE_WINDOW ||
|
||||||
|
pSrcDrawable->type != DRAWABLE_WINDOW)))
|
||||||
|
ordering = CT_YXBANDED;
|
||||||
|
else
|
||||||
|
ordering = CT_UNSORTED;
|
||||||
|
|
||||||
|
srcregion = RECTS_TO_REGION(pScreen, nbox, rects, ordering);
|
||||||
xfree(rects);
|
xfree(rects);
|
||||||
|
|
||||||
if (!pGC || !exaGCReadsDestination(pDstDrawable, pGC->planemask,
|
if (!pGC || !exaGCReadsDestination(pDstDrawable, pGC->planemask,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue