[PATCH 08/12] DRI2: handle target_msc of 0 case

Jesse Barnes jbarnes at virtuousgeek.org
Mon Mar 22 15:03:38 PDT 2010


An OML swap can have a 0 target_msc, which just means it needs to satisfy
the divisor/remainder equation.  Pass this down to the driver as needed
so we can support it.

Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
---
 hw/xfree86/dri2/dri2.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index eb61526..9825a55 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -647,13 +647,7 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc,
 	 */
 	*swap_target = pPriv->last_swap_target + pPriv->swap_interval;
     } else {
-	/* glXSwapBuffersMscOML() call with target_msc, divisor, remainder set.
-	 * Just make sure that target_msc is not earlier than last swap target +
-	 * swap interval.
-	 */
-	if (target_msc < pPriv->last_swap_target + pPriv->swap_interval)
-	    target_msc = pPriv->last_swap_target + pPriv->swap_interval;
-
+	/* glXSwapBuffersMscOML could have a 0 target_msc, honor it */
 	*swap_target = target_msc;
     }
 
-- 
1.6.6.1



More information about the xorg-devel mailing list