summaryrefslogtreecommitdiff
path: root/exa/exa_render.c
diff options
context:
space:
mode:
authorMaarten Maathuis <madman2003@gmail.com>2008-08-26 16:54:29 +0200
committerMaarten Maathuis <madman2003@gmail.com>2008-08-26 17:56:40 +0200
commit988725f32e082aee9392a71464125157a83d1e67 (patch)
tree82b0df5ca8e244617285d8ca662b92e66efa9b66 /exa/exa_render.c
parentce193476808f54d946351458361c62132d81b62f (diff)
exa: move destination damage for internal calls to a special function
- This should improve clarity for someone who isn't familiar with the code.
Diffstat (limited to 'exa/exa_render.c')
-rw-r--r--exa/exa_render.c43
1 files changed, 11 insertions, 32 deletions
diff --git a/exa/exa_render.c b/exa/exa_render.c
index 704228537..d45af0a14 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -520,12 +520,7 @@ exaCompositeRects(CARD8 op,
REGION_INIT(pScreen, &region, &box, 1);
- exaGetDrawableDeltas(pDst->pDrawable, pPixmap, &xoff, &yoff);
-
- REGION_TRANSLATE(pScreen, &region, xoff, yoff);
- pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
- REGION_UNION(pScreen, pending_damage, pending_damage, &region);
- REGION_TRANSLATE(pScreen, &region, -xoff, -yoff);
+ exaDamageDestForMigration(pPixmap, &region);
}
/************************************************************/
@@ -1074,22 +1069,14 @@ exaTrapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
if (pExaPixmap->pDamage) {
RegionRec migration;
- RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
- int xoff, yoff;
-
- exaGetDrawableDeltas(pDraw, pixmap, &xoff, &yoff);
-
- xoff += pDraw->x;
- yoff += pDraw->y;
- bounds.x1 += xoff;
- bounds.y1 += yoff;
- bounds.x2 += xoff;
- bounds.y2 += yoff;
+ bounds.x1 += pDraw->x;
+ bounds.y1 += pDraw->y;
+ bounds.x2 += pDraw->x;
+ bounds.y2 += pDraw->y;
REGION_INIT(pScreen, &migration, &bounds, 1);
- REGION_UNION(pScreen, pending_damage, pending_damage, &migration);
- REGION_UNINIT(pScreen, &migration);
+ exaDamageDestForMigration(pixmap, &migration);
}
exaPrepareAccess(pDraw, EXA_PREPARE_DEST);
@@ -1180,22 +1167,14 @@ exaTriangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
if (pExaPixmap->pDamage) {
RegionRec migration;
- RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
- int xoff, yoff;
-
- exaGetDrawableDeltas(pDraw, pixmap, &xoff, &yoff);
-
- xoff += pDraw->x;
- yoff += pDraw->y;
- bounds.x1 += xoff;
- bounds.y1 += yoff;
- bounds.x2 += xoff;
- bounds.y2 += yoff;
+ bounds.x1 += pDraw->x;
+ bounds.y1 += pDraw->y;
+ bounds.x2 += pDraw->x;
+ bounds.y2 += pDraw->y;
REGION_INIT(pScreen, &migration, &bounds, 1);
- REGION_UNION(pScreen, pending_damage, pending_damage, &migration);
- REGION_UNINIT(pScreen, &migration);
+ exaDamageDestForMigration(pixmap, &migration);
}
exaPrepareAccess(pDraw, EXA_PREPARE_DEST);