summaryrefslogtreecommitdiff
path: root/exa/exa.c
diff options
context:
space:
mode:
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);
}