summaryrefslogtreecommitdiff
path: root/exa/exa_render.c
diff options
context:
space:
mode:
authorMaarten Maathuis <madman2003@gmail.com>2008-08-26 17:03:12 +0200
committerMaarten Maathuis <madman2003@gmail.com>2008-08-26 17:56:40 +0200
commitde79edbd9f67762950eaac2dc79668035239897c (patch)
treea13124e740a15dd977440103a1fb67ee92604a7e /exa/exa_render.c
parent988725f32e082aee9392a71464125157a83d1e67 (diff)
exa: report damage manually for exa{Trapezoids,Triangles} when needed
- Plus a micro cleanup of unused variables.
Diffstat (limited to 'exa/exa_render.c')
-rw-r--r--exa/exa_render.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/exa/exa_render.c b/exa/exa_render.c
index d45af0a14..88ea29a0f 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -471,12 +471,10 @@ exaCompositeRects(CARD8 op,
ExaCompositeRectPtr r;
if (pExaPixmap->pDamage) {
- int xoff, yoff;
int x1 = MAXSHORT;
int y1 = MAXSHORT;
int x2 = MINSHORT;
int y2 = MINSHORT;
- RegionPtr pending_damage;
BoxRec box;
/* 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;
PixmapPtr pixmap = exaGetDrawablePixmap (pDraw);
ExaPixmapPriv (pixmap);
+ RegionRec migration;
if (pExaPixmap->pDamage) {
- RegionRec migration;
-
bounds.x1 += pDraw->x;
bounds.y1 += pDraw->y;
bounds.x2 += pDraw->x;
@@ -1085,6 +1082,13 @@ exaTrapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
(*ps->RasterizeTrapezoid) (pDst, traps, 0, 0);
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)
{
@@ -1164,10 +1168,9 @@ exaTriangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
DrawablePtr pDraw = pDst->pDrawable;
PixmapPtr pixmap = exaGetDrawablePixmap (pDraw);
ExaPixmapPriv (pixmap);
+ RegionRec migration;
if (pExaPixmap->pDamage) {
- RegionRec migration;
-
bounds.x1 += pDraw->x;
bounds.y1 += pDraw->y;
bounds.x2 += pDraw->x;
@@ -1180,6 +1183,13 @@ exaTriangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
exaPrepareAccess(pDraw, EXA_PREPARE_DEST);
(*ps->AddTriangles) (pDst, 0, 0, ntri, tris);
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)
{