EXA: Defer to FillRegionTiled in Composite when possible.
Committed separately as this case is hard to hit and has only been tested lightly.
This commit is contained in:
parent
81b055605c
commit
a8d6ebdf93
|
@ -651,6 +651,45 @@ exaComposite(CARD8 op,
|
|||
REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
|
||||
goto done;
|
||||
}
|
||||
else if (pSrcPixmap && !pSrc->transform &&
|
||||
pSrc->repeatType == RepeatNormal)
|
||||
{
|
||||
RegionRec region;
|
||||
DDXPointRec srcOrg;
|
||||
|
||||
/* Let's see if the driver can do the repeat in one go */
|
||||
if (pExaScr->info->PrepareComposite && !pSrc->alphaMap &&
|
||||
!pDst->alphaMap)
|
||||
{
|
||||
ret = exaTryDriverComposite(op, pSrc, pMask, pDst, xSrc,
|
||||
ySrc, xMask, yMask, xDst, yDst,
|
||||
width, height);
|
||||
if (ret == 1)
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Now see if we can use exaFillRegionTiled() */
|
||||
xDst += pDst->pDrawable->x;
|
||||
yDst += pDst->pDrawable->y;
|
||||
xSrc += pSrc->pDrawable->x;
|
||||
ySrc += pSrc->pDrawable->y;
|
||||
|
||||
if (!miComputeCompositeRegion (®ion, pSrc, pMask, pDst, xSrc,
|
||||
ySrc, xMask, yMask, xDst, yDst,
|
||||
width, height))
|
||||
goto done;
|
||||
|
||||
srcOrg.x = (xSrc - xDst) % pSrcPixmap->drawable.width;
|
||||
srcOrg.y = (ySrc - yDst) % pSrcPixmap->drawable.height;
|
||||
|
||||
ret = exaFillRegionTiled(pDst->pDrawable, ®ion, pSrcPixmap,
|
||||
&srcOrg, FB_ALLONES, GXcopy);
|
||||
|
||||
REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
|
||||
|
||||
if (ret)
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue