summaryrefslogtreecommitdiff
path: root/src/radeon_dri2.c
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-07-18 22:14:27 +0200
committerMichel Dänzer <michel@daenzer.net>2009-07-18 22:14:27 +0200
commit27bd9fc9b2c0eeff488c1f26f1355a7fa3655520 (patch)
tree88ef4b82799a9b1edfb6b5c8c314c3469fd34e73 /src/radeon_dri2.c
parent4b1b28865ffb17f58a70d955212fd51cb1fb55ab (diff)
Enable vsync for DRI2 region copies.
Diffstat (limited to 'src/radeon_dri2.c')
-rw-r--r--src/radeon_dri2.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index 4770ba3c..08da996a 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -228,6 +228,8 @@ radeon_dri2_copy_region(DrawablePtr drawable,
PixmapPtr dst_pixmap;
RegionPtr copy_clip;
GCPtr gc;
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+ Bool vsync;
src_pixmap = src_private->pixmap;
dst_pixmap = dst_private->pixmap;
@@ -242,8 +244,15 @@ radeon_dri2_copy_region(DrawablePtr drawable,
REGION_COPY(pScreen, copy_clip, region);
(*gc->funcs->ChangeClip) (gc, CT_REGION, copy_clip, 0);
ValidateGC(&dst_pixmap->drawable, gc);
+
+ vsync = info->accel_state->vsync;
+ info->accel_state->vsync = TRUE;
+
(*gc->ops->CopyArea)(&src_pixmap->drawable, &dst_pixmap->drawable, gc,
0, 0, drawable->width, drawable->height, 0, 0);
+
+ info->accel_state->vsync = vsync;
+
FreeScratchGC(gc);
radeon_cs_flush_indirect(pScrn);
}