exa: avoid doing prepare/done without intervening copies in exaFillRegionTiled
This does a precursor check to make sure the copies are required before entering the prepare/done code.
This commit is contained in:
parent
8f8a9c19ad
commit
08cd361234
|
@ -1233,8 +1233,24 @@ exaFillRegionTiled (DrawablePtr pDrawable,
|
|||
*/
|
||||
if (alu != GXcopy)
|
||||
ret = TRUE;
|
||||
else if ((*pExaScr->info->PrepareCopy) (pPixmap, pPixmap, 1, 1, alu,
|
||||
planemask)) {
|
||||
else {
|
||||
Bool more_copy = FALSE;
|
||||
|
||||
for (i = 0; i < nbox; i++) {
|
||||
int dstX = pBox[i].x1 + tileWidth;
|
||||
int dstY = pBox[i].y1 + tileHeight;
|
||||
|
||||
if ((dstX < pBox[i].x2) || (dstY < pBox[i].y2)) {
|
||||
more_copy = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (more_copy == FALSE)
|
||||
ret = TRUE;
|
||||
|
||||
if (more_copy && (*pExaScr->info->PrepareCopy) (pPixmap, pPixmap,
|
||||
1, 1, alu, planemask)) {
|
||||
for (i = 0; i < nbox; i++)
|
||||
{
|
||||
int dstX = pBox[i].x1 + tileWidth;
|
||||
|
@ -1264,6 +1280,7 @@ exaFillRegionTiled (DrawablePtr pDrawable,
|
|||
|
||||
ret = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
exaMarkSync(pDrawable->pScreen);
|
||||
|
||||
|
|
Loading…
Reference in New Issue