diff options
author | Eric Anholt <[email protected]> | 2012-09-25 12:15:19 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-10-09 14:32:03 -0700 |
commit | 811602885bb5fa56f04927c29b882675e7ff311c (patch) | |
tree | 90fdcfdb6a81c65213d6a5d19d24119418ef4399 /src/glx/dri2_glx.c | |
parent | 7acf8ae0e1ed295fc1550f14e8ca812ba4f8af1f (diff) |
glx: Replace DRI2SwapInterval custom protocol with XCB.
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/glx/dri2_glx.c')
-rw-r--r-- | src/glx/dri2_glx.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index cb3412e8fc6..9a7dd7a56e0 100644 --- a/src/glx/dri2_glx.c +++ b/src/glx/dri2_glx.c @@ -812,11 +812,10 @@ dri2GetBuffersWithFormat(__DRIdrawable * driDrawable, return pdraw->buffers; } -#ifdef X_DRI2SwapInterval - static int dri2SetSwapInterval(__GLXDRIdrawable *pdraw, int interval) { + xcb_connection_t *c = XGetXCBConnection(pdraw->psc->dpy); struct dri2_drawable *priv = (struct dri2_drawable *) pdraw; GLint vblank_mode = DRI_CONF_VBLANK_DEF_INTERVAL_1; struct dri2_screen *psc = (struct dri2_screen *) priv->base.psc; @@ -838,7 +837,7 @@ dri2SetSwapInterval(__GLXDRIdrawable *pdraw, int interval) break; } - DRI2SwapInterval(priv->base.psc->dpy, priv->base.xDrawable, interval); + xcb_dri2_swap_interval(c, priv->base.xDrawable, interval); priv->swap_interval = interval; return 0; @@ -852,8 +851,6 @@ dri2GetSwapInterval(__GLXDRIdrawable *pdraw) return priv->swap_interval; } -#endif /* X_DRI2SwapInterval */ - static const __DRIdri2LoaderExtension dri2LoaderExtension = { {__DRI_DRI2_LOADER, __DRI_DRI2_LOADER_VERSION}, dri2GetBuffers, @@ -1147,10 +1144,8 @@ dri2CreateScreen(int screen, struct glx_display * priv) psp->getDrawableMSC = dri2DrawableGetMSC; psp->waitForMSC = dri2WaitForMSC; psp->waitForSBC = dri2WaitForSBC; -#ifdef X_DRI2SwapInterval psp->setSwapInterval = dri2SetSwapInterval; psp->getSwapInterval = dri2GetSwapInterval; -#endif __glXEnableDirectExtension(&psc->base, "GLX_OML_sync_control"); } |