From 7106a77df37c06d2b5568eceeb9297096bff3137 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sun, 2 Jul 2006 12:41:35 +0200 Subject: [PATCH] Fix bugs in support for new repeatTypes in XAA and EXA. EXA now won't pass pictures with new repeatTypes to drivers. We can add a flag for them to support it at a later time. --- exa/exa_render.c | 5 ++++- hw/xfree86/xaa/xaaPict.c | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/exa/exa_render.c b/exa/exa_render.c index b21c5d724..2187af810 100644 --- a/exa/exa_render.c +++ b/exa/exa_render.c @@ -535,7 +535,8 @@ exaComposite(CARD8 op, if (op == PictOpSrc) { if (pSrc->pDrawable->width == 1 && - pSrc->pDrawable->height == 1 && pSrc->repeat) + pSrc->pDrawable->height == 1 && pSrc->repeat && + pSrc->repeatType == RepeatNormal) { ret = exaTryDriverSolidFill(pSrc, pDst, xSrc, ySrc, xDst, yDst, width, height); @@ -575,6 +576,8 @@ exaComposite(CARD8 op, pMask->repeat = 0; if (pExaScr->info->PrepareComposite && + (!pSrc->repeat || pSrc->repeat == RepeatNormal) && + (!pMask || !pMask->repeat || pMask->repeat == RepeatNormal) && !pSrc->alphaMap && (!pMask || !pMask->alphaMap) && !pDst->alphaMap) { ret = exaTryDriverComposite(op, pSrc, pMask, pDst, xSrc, ySrc, xMask, diff --git a/hw/xfree86/xaa/xaaPict.c b/hw/xfree86/xaa/xaaPict.c index a1ff51087..a7acf450a 100644 --- a/hw/xfree86/xaa/xaaPict.c +++ b/hw/xfree86/xaa/xaaPict.c @@ -218,7 +218,13 @@ XAADoComposite ( if (pDst->alphaMap || pSrc->alphaMap || (pMask && pMask->alphaMap)) return FALSE; - + + if ((pSrc->repeat && pSrc->repeatType != RepeatNormal) || + (pMask && pMask->repeat && pMask->repeatType != RepeatNormal)) + { + return FALSE; + } + xDst += pDst->pDrawable->x; yDst += pDst->pDrawable->y; xSrc += pSrc->pDrawable->x;