From 27bd9fc9b2c0eeff488c1f26f1355a7fa3655520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Sat, 18 Jul 2009 22:14:27 +0200 Subject: Enable vsync for DRI2 region copies. --- src/radeon_dri2.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/radeon_dri2.c') 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); } -- cgit v1.2.3