From 87ca6320f26eb3129e3c19056e1d8fa5c1784723 Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Fri, 5 Mar 2010 09:49:03 -0800 Subject: [PATCH] DRI2: handle swap_interval of 0 correctly A 0 swap interval means that swaps shouldn't be sync'd to vblank, so just complete the swap immediately in that case. Reviewed-by: Mario Kleiner Signed-off-by: Jesse Barnes --- hw/xfree86/dri2/dri2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index 58f478f49..9825a55ce 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -616,8 +616,8 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, return BadDrawable; } - /* Old DDX, just blit */ - if (!ds->ScheduleSwap) { + /* Old DDX or no swap interval, just blit */ + if (!ds->ScheduleSwap || !pPriv->swap_interval) { BoxRec box; RegionRec region;