Make sure GLX_SGI_swap_control is set up correctly

glXSwapIntervalSGI only affects buffer swaps to the
current GLX drawable.

That means that calling it once in clutter_backend_glx_get_features
isn't sufficent, so set it up in clutter_backend_glx_ensure_context to
make sure it affects buffer swaps for the current drawable.

http://bugzilla.openedhand.com/show_bug.cgi?id=2044

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
This commit is contained in:
Adel Gadllah 2010-03-21 13:12:58 +01:00 committed by Emmanuele Bassi
parent 2fc8ecdb92
commit 5de85051c3

View File

@ -692,6 +692,12 @@ clutter_backend_glx_ensure_context (ClutterBackend *backend,
drawable, drawable,
drawable, drawable,
backend_glx->gl_context); backend_glx->gl_context);
/*
* In case we are using GLX_SGI_swap_control for vblank syncing we need call
* glXSwapIntervalSGI here to make sure that it affects the current drawable.
*/
if (backend_glx->vblank_type == CLUTTER_VBLANK_GLX_SWAP && backend_glx->swap_interval != NULL)
backend_glx->swap_interval (1);
} }
if (clutter_x11_untrap_x_errors ()) if (clutter_x11_untrap_x_errors ())