summaryrefslogtreecommitdiff
path: root/exa/exa.c
diff options
context:
space:
mode:
authorMaarten Maathuis <madman2003@gmail.com>2008-08-29 22:15:23 +0200
committerMaarten Maathuis <madman2003@gmail.com>2008-08-29 22:15:23 +0200
commit1861250cd7e84b05e8298b74e3c7e97da72ddfba (patch)
tree1027bb4b5830f0ec336e9e082f4b5dc73fe4bea8 /exa/exa.c
parent5af77d43fe812e127d5d335527fa940ab9d95f38 (diff)
{damage,exa}: sanitise damage
- Redo damage naming for more consistency. - Call post submission functions only where appropriate. - EXA can now live without it's odd damage workarounds.
Diffstat (limited to 'exa/exa.c')
-rw-r--r--exa/exa.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/exa/exa.c b/exa/exa.c
index 677e2d52b..2ceee51b1 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -261,21 +261,6 @@ exaSetFbPitch(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap,
pExaScr->info->pixmapPitchAlign);
}
-
-static void
-ExaDamageReport(DamagePtr pDamage, RegionPtr pReg, void *pClosure)
-{
- PixmapPtr pPixmap = pClosure;
- ExaPixmapPriv(pPixmap);
- RegionPtr pDamageReg = DamageRegion(pDamage);
-
- if (pExaPixmap->pendingDamage) {
- REGION_UNION(pScreen, pDamageReg, pDamageReg, pReg);
- pExaPixmap->pendingDamage = FALSE;
- }
-}
-
-
/**
* exaCreatePixmap() creates a new pixmap.
*
@@ -363,8 +348,8 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
}
/* Set up damage tracking */
- pExaPixmap->pDamage = DamageCreate (ExaDamageReport, NULL,
- DamageReportRawRegion, TRUE,
+ pExaPixmap->pDamage = DamageCreate (NULL, NULL,
+ DamageReportNone, TRUE,
pScreen, pPixmap);
if (pExaPixmap->pDamage == NULL) {
@@ -373,6 +358,8 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
}
DamageRegister (&pPixmap->drawable, pExaPixmap->pDamage);
+ /* This ensures that pending damage reflects the current operation. */
+ /* This is used by exa to optimize migration. */
DamageSetReportAfterOp (pExaPixmap->pDamage, TRUE);
}