[Mesa-dev] [PATCH 14/19] glx: Reuse setSwapInterval for setting initial swap interval.
Eric Anholt
eric at anholt.net
Tue Sep 25 19:50:12 PDT 2012
---
src/glx/dri2_glx.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 42aeeff..178159a 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -419,15 +419,12 @@ dri2CreateDrawable(struct glx_screen *base, XID xDrawable,
return None;
}
-
-#ifdef X_DRI2SwapInterval
/*
* Make sure server has the same swap interval we do for the new
* drawable.
*/
- if (pdp->swapAvailable)
- DRI2SwapInterval(psc->base.dpy, xDrawable, pdraw->swap_interval);
-#endif
+ if (psc->vtable.setSwapInterval)
+ psc->vtable.setSwapInterval(&pdraw->base, pdraw->swap_interval);
return &pdraw->base;
}
@@ -829,7 +826,9 @@ dri2SetSwapInterval(__GLXDRIdrawable *pdraw, int interval)
switch (vblank_mode) {
case DRI_CONF_VBLANK_NEVER:
- return GLX_BAD_VALUE;
+ if (interval != 0)
+ return GLX_BAD_VALUE;
+ break;
case DRI_CONF_VBLANK_ALWAYS_SYNC:
if (interval <= 0)
return GLX_BAD_VALUE;
--
1.7.10.4
More information about the mesa-dev
mailing list