exaPolyFillRect: Don't track damage explicitly.
All callers should already do it. Also don't leak pReg.
This commit is contained in:
parent
87966c5d28
commit
c9b79a3558
|
@ -643,15 +643,13 @@ exaPolyFillRect(DrawablePtr pDrawable,
|
||||||
int n;
|
int n;
|
||||||
ExaMigrationRec pixmaps[2];
|
ExaMigrationRec pixmaps[2];
|
||||||
RegionPtr pReg = RECTS_TO_REGION(pScreen, nrect, prect, CT_UNSORTED);
|
RegionPtr pReg = RECTS_TO_REGION(pScreen, nrect, prect, CT_UNSORTED);
|
||||||
RegionPtr pDamageReg = DamageRegion(ExaGetPixmapPriv(pPixmap)->pDamage);
|
|
||||||
|
|
||||||
/* Compute intersection of rects and clip region */
|
/* Compute intersection of rects and clip region */
|
||||||
REGION_TRANSLATE(pScreen, pReg, pDrawable->x, pDrawable->y);
|
REGION_TRANSLATE(pScreen, pReg, pDrawable->x, pDrawable->y);
|
||||||
REGION_INTERSECT(pScreen, pReg, pClip, pReg);
|
REGION_INTERSECT(pScreen, pReg, pClip, pReg);
|
||||||
|
|
||||||
if (!REGION_NUM_RECTS(pReg)) {
|
if (!REGION_NUM_RECTS(pReg)) {
|
||||||
REGION_DESTROY(pScreen, pReg);
|
goto out;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pixmaps[0].as_dst = TRUE;
|
pixmaps[0].as_dst = TRUE;
|
||||||
|
@ -680,7 +678,7 @@ exaPolyFillRect(DrawablePtr pDrawable,
|
||||||
(pGC->fillStyle == FillTiled && !pGC->tileIsPixel &&
|
(pGC->fillStyle == FillTiled && !pGC->tileIsPixel &&
|
||||||
exaFillRegionTiled(pDrawable, pReg, pGC->tile.pixmap, &pGC->patOrg,
|
exaFillRegionTiled(pDrawable, pReg, pGC->tile.pixmap, &pGC->patOrg,
|
||||||
pGC->planemask, pGC->alu))) {
|
pGC->planemask, pGC->alu))) {
|
||||||
goto damage;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -709,13 +707,7 @@ fallback:
|
||||||
}
|
}
|
||||||
|
|
||||||
ExaCheckPolyFillRect (pDrawable, pGC, nrect, prect);
|
ExaCheckPolyFillRect (pDrawable, pGC, nrect, prect);
|
||||||
|
goto out;
|
||||||
damage:
|
|
||||||
REGION_TRANSLATE(pScreen, pReg, xoff, yoff);
|
|
||||||
REGION_UNION(pScreen, pDamageReg, pReg, pDamageReg);
|
|
||||||
REGION_DESTROY(pScreen, pReg);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
xorg = pDrawable->x;
|
xorg = pDrawable->x;
|
||||||
|
@ -754,8 +746,6 @@ damage:
|
||||||
(*pExaScr->info->Solid) (pPixmap,
|
(*pExaScr->info->Solid) (pPixmap,
|
||||||
fullX1 + xoff, fullY1 + yoff,
|
fullX1 + xoff, fullY1 + yoff,
|
||||||
fullX2 + xoff, fullY2 + yoff);
|
fullX2 + xoff, fullY2 + yoff);
|
||||||
exaPixmapDirty (pPixmap, fullX1 + xoff, fullY1 + yoff,
|
|
||||||
fullX2 + xoff, fullY2 + yoff);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -786,14 +776,15 @@ damage:
|
||||||
(*pExaScr->info->Solid) (pPixmap,
|
(*pExaScr->info->Solid) (pPixmap,
|
||||||
partX1 + xoff, partY1 + yoff,
|
partX1 + xoff, partY1 + yoff,
|
||||||
partX2 + xoff, partY2 + yoff);
|
partX2 + xoff, partY2 + yoff);
|
||||||
exaPixmapDirty (pPixmap, partX1 + xoff, partY1 + yoff,
|
|
||||||
partX2 + xoff, partY2 + yoff);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
(*pExaScr->info->DoneSolid) (pPixmap);
|
(*pExaScr->info->DoneSolid) (pPixmap);
|
||||||
exaMarkSync(pDrawable->pScreen);
|
exaMarkSync(pDrawable->pScreen);
|
||||||
|
|
||||||
|
out:
|
||||||
|
REGION_DESTROY(pScreen, pReg);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue