summaryrefslogtreecommitdiff
path: root/exa/exa_migration.c
diff options
context:
space:
mode:
Diffstat (limited to 'exa/exa_migration.c')
-rw-r--r--exa/exa_migration.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/exa/exa_migration.c b/exa/exa_migration.c
index 2b9dc63dd..c8e57e440 100644
--- a/exa/exa_migration.c
+++ b/exa/exa_migration.c
@@ -159,6 +159,10 @@ exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area)
pPixmap->devPrivate.ptr = dst;
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
pExaPixmap->area = NULL;
+ /* Mark it dirty now, to say that there is important data in the
+ * system-memory copy.
+ */
+ pExaPixmap->dirty = TRUE;
}
static int
@@ -238,6 +242,16 @@ exaMoveInPixmap (PixmapPtr pPixmap)
return;
}
+ /* If the "dirty" flag has never been set on the in-memory pixmap, then
+ * nothing has been written to it, so the contents are undefined and we can
+ * avoid the upload.
+ */
+ if (!pExaPixmap->dirty) {
+ DBG_MIGRATE(("saved upload of %dx%d\n", pPixmap->drawable.width,
+ pPixmap->drawable.height));
+ return;
+ }
+
pExaPixmap->dirty = FALSE;
if (pExaScr->info->accel.UploadToScreen)