GitLab will be down for maintenance this Sunday 13th June, from approx 7-11am UTC. This is for a PostgreSQL migration. See the tracker issue for more informations.

Commit a8d6ebdf authored by Michel Dänzer's avatar Michel Dänzer
Browse files

EXA: Defer to FillRegionTiled in Composite when possible.

Committed separately as this case is hard to hit and has only been tested
lightly.
parent 81b05560
......@@ -651,6 +651,45 @@ exaComposite(CARD8 op,
REGION_UNINIT(pDst->pDrawable->pScreen, &region);
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 (&region, 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, &region, pSrcPixmap,
&srcOrg, FB_ALLONES, GXcopy);
REGION_UNINIT(pDst->pDrawable->pScreen, &region);
if (ret)
goto done;
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment