exa: exaPixmapDirty should use official damage functions.
- Otherwise other users will not be notified of damage.
This commit is contained in:
parent
97c1cbc702
commit
3175646b10
10
exa/exa.c
10
exa/exa.c
|
@ -160,14 +160,9 @@ exaGetDrawableDeltas (DrawablePtr pDrawable, PixmapPtr pPixmap,
|
||||||
void
|
void
|
||||||
exaPixmapDirty (PixmapPtr pPix, int x1, int y1, int x2, int y2)
|
exaPixmapDirty (PixmapPtr pPix, int x1, int y1, int x2, int y2)
|
||||||
{
|
{
|
||||||
ExaPixmapPriv(pPix);
|
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
RegionPtr pDamageReg;
|
|
||||||
RegionRec region;
|
RegionRec region;
|
||||||
|
|
||||||
if (!pExaPixmap || !pExaPixmap->pDamage)
|
|
||||||
return;
|
|
||||||
|
|
||||||
box.x1 = max(x1, 0);
|
box.x1 = max(x1, 0);
|
||||||
box.y1 = max(y1, 0);
|
box.y1 = max(y1, 0);
|
||||||
box.x2 = min(x2, pPix->drawable.width);
|
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)
|
if (box.x1 >= box.x2 || box.y1 >= box.y2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pDamageReg = DamageRegion(pExaPixmap->pDamage);
|
|
||||||
|
|
||||||
REGION_INIT(pScreen, ®ion, &box, 1);
|
REGION_INIT(pScreen, ®ion, &box, 1);
|
||||||
REGION_UNION(pScreen, pDamageReg, pDamageReg, ®ion);
|
DamageRegionAppend(&pPix->drawable, ®ion);
|
||||||
|
DamageRegionProcessPending(&pPix->drawable);
|
||||||
REGION_UNINIT(pScreen, ®ion);
|
REGION_UNINIT(pScreen, ®ion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue