exa: report damage manually for exa{Trapezoids,Triangles} when needed
- Plus a micro cleanup of unused variables.
This commit is contained in:
parent
988725f32e
commit
de79edbd9f
|
@ -471,12 +471,10 @@ exaCompositeRects(CARD8 op,
|
||||||
ExaCompositeRectPtr r;
|
ExaCompositeRectPtr r;
|
||||||
|
|
||||||
if (pExaPixmap->pDamage) {
|
if (pExaPixmap->pDamage) {
|
||||||
int xoff, yoff;
|
|
||||||
int x1 = MAXSHORT;
|
int x1 = MAXSHORT;
|
||||||
int y1 = MAXSHORT;
|
int y1 = MAXSHORT;
|
||||||
int x2 = MINSHORT;
|
int x2 = MINSHORT;
|
||||||
int y2 = MINSHORT;
|
int y2 = MINSHORT;
|
||||||
RegionPtr pending_damage;
|
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
|
|
||||||
/* We have to manage the damage ourselves, since CompositeRects isn't
|
/* We have to manage the damage ourselves, since CompositeRects isn't
|
||||||
|
@ -1066,10 +1064,9 @@ exaTrapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
|
||||||
DrawablePtr pDraw = pDst->pDrawable;
|
DrawablePtr pDraw = pDst->pDrawable;
|
||||||
PixmapPtr pixmap = exaGetDrawablePixmap (pDraw);
|
PixmapPtr pixmap = exaGetDrawablePixmap (pDraw);
|
||||||
ExaPixmapPriv (pixmap);
|
ExaPixmapPriv (pixmap);
|
||||||
|
RegionRec migration;
|
||||||
|
|
||||||
if (pExaPixmap->pDamage) {
|
if (pExaPixmap->pDamage) {
|
||||||
RegionRec migration;
|
|
||||||
|
|
||||||
bounds.x1 += pDraw->x;
|
bounds.x1 += pDraw->x;
|
||||||
bounds.y1 += pDraw->y;
|
bounds.y1 += pDraw->y;
|
||||||
bounds.x2 += pDraw->x;
|
bounds.x2 += pDraw->x;
|
||||||
|
@ -1085,6 +1082,13 @@ exaTrapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
|
||||||
(*ps->RasterizeTrapezoid) (pDst, traps, 0, 0);
|
(*ps->RasterizeTrapezoid) (pDst, traps, 0, 0);
|
||||||
|
|
||||||
exaFinishAccess(pDraw, EXA_PREPARE_DEST);
|
exaFinishAccess(pDraw, EXA_PREPARE_DEST);
|
||||||
|
|
||||||
|
/* Damage manually, because Trapezoids expects to hit Composite normally. */
|
||||||
|
/* Composite is wrapped by damage, but Trapezoids isn't. */
|
||||||
|
if (pExaPixmap->pDamage) {
|
||||||
|
DamageDamageRegion(pDraw, &migration);
|
||||||
|
REGION_UNINIT(pScreen, &migration);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (maskFormat)
|
else if (maskFormat)
|
||||||
{
|
{
|
||||||
|
@ -1164,10 +1168,9 @@ exaTriangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
|
||||||
DrawablePtr pDraw = pDst->pDrawable;
|
DrawablePtr pDraw = pDst->pDrawable;
|
||||||
PixmapPtr pixmap = exaGetDrawablePixmap (pDraw);
|
PixmapPtr pixmap = exaGetDrawablePixmap (pDraw);
|
||||||
ExaPixmapPriv (pixmap);
|
ExaPixmapPriv (pixmap);
|
||||||
|
RegionRec migration;
|
||||||
|
|
||||||
if (pExaPixmap->pDamage) {
|
if (pExaPixmap->pDamage) {
|
||||||
RegionRec migration;
|
|
||||||
|
|
||||||
bounds.x1 += pDraw->x;
|
bounds.x1 += pDraw->x;
|
||||||
bounds.y1 += pDraw->y;
|
bounds.y1 += pDraw->y;
|
||||||
bounds.x2 += pDraw->x;
|
bounds.x2 += pDraw->x;
|
||||||
|
@ -1180,6 +1183,13 @@ exaTriangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
|
||||||
exaPrepareAccess(pDraw, EXA_PREPARE_DEST);
|
exaPrepareAccess(pDraw, EXA_PREPARE_DEST);
|
||||||
(*ps->AddTriangles) (pDst, 0, 0, ntri, tris);
|
(*ps->AddTriangles) (pDst, 0, 0, ntri, tris);
|
||||||
exaFinishAccess(pDraw, EXA_PREPARE_DEST);
|
exaFinishAccess(pDraw, EXA_PREPARE_DEST);
|
||||||
|
|
||||||
|
/* Damage manually, because Triangles expects to hit Composite normally. */
|
||||||
|
/* Composite is wrapped by damage, but Triangles isn't. */
|
||||||
|
if (pExaPixmap->pDamage) {
|
||||||
|
DamageDamageRegion(pDraw, &migration);
|
||||||
|
REGION_UNINIT(pScreen, &migration);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (maskFormat)
|
else if (maskFormat)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue