summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2008-10-20 09:55:24 -0400
committerAdam Jackson <ajax@redhat.com>2008-11-05 13:01:35 -0500
commitf4c33e2e64ce83c29c3bc79853e421247acfea11 (patch)
treef18532cb5dbdfedf056c1487943ae93a3353a1df
parentdf22857b34edb9f29ace3800ba99f14c7be8058e (diff)
EXA: Avoid excessive syncing in PutImage
(cherry picked from commit 2188582e5ea90edb432a2f421d0a267439ba08f9)
-rw-r--r--exa/exa_migration.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/exa/exa_migration.c b/exa/exa_migration.c
index 5f22474e9..b7cc06240 100644
--- a/exa/exa_migration.c
+++ b/exa/exa_migration.c
@@ -132,6 +132,7 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
BoxPtr pBox;
int nbox;
Bool access_prepared = FALSE;
+ Bool need_sync = FALSE;
/* Damaged bits are valid in current copy but invalid in other one */
if (exaPixmapIsOffscreen(pPixmap)) {
@@ -223,14 +224,15 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
exaMemcpyBox (pPixmap, pBox,
fallback_src, fallback_srcpitch,
fallback_dst, fallback_dstpitch);
- }
+ } else
+ need_sync = TRUE;
pBox++;
}
if (access_prepared)
exaFinishAccess(&pPixmap->drawable, fallback_index);
- else
+ else if (need_sync)
sync (pPixmap->drawable.pScreen);
pExaPixmap->offscreen = save_offscreen;