exa: exaPixmapDirty should use official damage functions.

- Otherwise other users will not be notified of damage.
This commit is contained in:
Maarten Maathuis 2009-02-17 19:06:35 +01:00
parent 97c1cbc702
commit 3175646b10

View File

@ -160,14 +160,9 @@ exaGetDrawableDeltas (DrawablePtr pDrawable, PixmapPtr pPixmap,
void
exaPixmapDirty (PixmapPtr pPix, int x1, int y1, int x2, int y2)
{
ExaPixmapPriv(pPix);
BoxRec box;
RegionPtr pDamageReg;
RegionRec region;
if (!pExaPixmap || !pExaPixmap->pDamage)
return;
box.x1 = max(x1, 0);
box.y1 = max(y1, 0);
box.x2 = min(x2, pPix->drawable.width);
@ -176,10 +171,9 @@ exaPixmapDirty (PixmapPtr pPix, int x1, int y1, int x2, int y2)
if (box.x1 >= box.x2 || box.y1 >= box.y2)
return;
pDamageReg = DamageRegion(pExaPixmap->pDamage);
REGION_INIT(pScreen, &region, &box, 1);
REGION_UNION(pScreen, pDamageReg, pDamageReg, &region);
DamageRegionAppend(&pPix->drawable, &region);
DamageRegionProcessPending(&pPix->drawable);
REGION_UNINIT(pScreen, &region);
}