diff --git a/exa/exa_render.c b/exa/exa_render.c index 2187af8..964356f 100644 --- a/exa/exa_render.c +++ b/exa/exa_render.c @@ -469,7 +469,7 @@ exaTryComponentAlphaHelper(CARD8 op, ExaScreenPriv (pDst->pDrawable->pScreen); assert(op == PictOpOver); - assert(pMask->componentAlpha == TRUE); + /* assert(pMask->componentAlpha == TRUE); */ if (pExaScr->info->CheckComposite && (!(*pExaScr->info->CheckComposite)(PictOpOutReverse, pSrc, pMask, @@ -580,16 +580,26 @@ exaComposite(CARD8 op, (!pMask || !pMask->repeat || pMask->repeat == RepeatNormal) && !pSrc->alphaMap && (!pMask || !pMask->alphaMap) && !pDst->alphaMap) { + Bool isSrcSolid; + ret = exaTryDriverComposite(op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height); if (ret == 1) goto done; + /* For generic masks and solid src pictures, mach64 can do Over in two + * passes, similar to the component-alpha case. + */ + isSrcSolid = pSrc->pDrawable->width == 1 && + pSrc->pDrawable->height == 1 && + pSrc->repeat; + /* If we couldn't do the Composite in a single pass, and it was a * component-alpha Over, see if we can do it in two passes with * an OutReverse and then an Add. */ - if (ret == -1 && pMask && pMask->componentAlpha && op == PictOpOver) { + if (ret == -1 && op == PictOpOver && pMask && + (pMask->componentAlpha || isSrcSolid)) { ret = exaTryComponentAlphaHelper(op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height);