summaryrefslogtreecommitdiff
path: root/exa/exa.c
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-07-20 02:04:40 +0200
committerMichel Dänzer <daenzer@vmware.com>2009-07-20 02:04:40 +0200
commit00fe4a297744c81b40f0243fb56ad848a9be6a2b (patch)
treeaf4a9fad26466eec474e04be5d6d117cf55bbd16 /exa/exa.c
parent7b9915b11ed9eedd0698b4563328504d686ac4ec (diff)
EXA: Completely eliminate exaDoMigration calls for drivers that manage pixmaps.
Diffstat (limited to 'exa/exa.c')
-rw-r--r--exa/exa.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/exa/exa.c b/exa/exa.c
index 608c81f5f..8d488b3c2 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -616,19 +616,24 @@ ExaDoPrepareAccess(DrawablePtr pDrawable, int index)
void
exaPrepareAccessReg(DrawablePtr pDrawable, int index, RegionPtr pReg)
{
- ExaMigrationRec pixmaps[1];
+ PixmapPtr pPixmap = exaGetDrawablePixmap (pDrawable);
+ ExaPixmapPriv(pPixmap);
- if (index == EXA_PREPARE_DEST || index == EXA_PREPARE_AUX_DEST) {
- pixmaps[0].as_dst = TRUE;
- pixmaps[0].as_src = FALSE;
- } else {
- pixmaps[0].as_dst = FALSE;
- pixmaps[0].as_src = TRUE;
- }
- pixmaps[0].pPix = exaGetDrawablePixmap (pDrawable);
- pixmaps[0].pReg = pReg;
+ if (pExaPixmap->pDamage) {
+ ExaMigrationRec pixmaps[1];
- exaDoMigration(pixmaps, 1, FALSE);
+ if (index == EXA_PREPARE_DEST || index == EXA_PREPARE_AUX_DEST) {
+ pixmaps[0].as_dst = TRUE;
+ pixmaps[0].as_src = FALSE;
+ } else {
+ pixmaps[0].as_dst = FALSE;
+ pixmaps[0].as_src = TRUE;
+ }
+ pixmaps[0].pPix = pPixmap;
+ pixmaps[0].pReg = pReg;
+
+ exaDoMigration(pixmaps, 1, FALSE);
+ }
ExaDoPrepareAccess(pDrawable, index);
}