gdk: move sync_to_vblank setup from master clock to backend

Setting up the sync_to_vblank in the MasterClock is a bit too late as
the MasterClock can be created after a StageWindow has been created
and realized (and therefore all of its Cogl/GL state setup already).
So move the setup to the backend, prior to any StageWindow creation.

https://bugzilla.gnome.org/show_bug.cgi?id=754938
This commit is contained in:
Lionel Landwerlin 2015-09-13 00:38:56 +02:00
parent 9f1db3f1b8
commit aeb19f2f4d
2 changed files with 5 additions and 4 deletions

View File

@ -441,6 +441,11 @@ static void
clutter_backend_gdk_init (ClutterBackendGdk *backend_gdk)
{
backend_gdk->dummy_onscreen = COGL_INVALID_HANDLE;
/* Deactivate sync to vblank since we have the GdkFrameClock to
* drive us from the compositor.
*/
_clutter_set_sync_to_vblank (FALSE);
}
/**

View File

@ -477,10 +477,6 @@ clutter_master_clock_gdk_init (ClutterMasterClockGdk *self)
for (l = stages; l; l = l->next)
clutter_master_clock_gdk_stage_added (manager, l->data, self);
/* Deactivate sync to vblank since we have clock to drive us from
the compositor. */
_clutter_set_sync_to_vblank (FALSE);
if (G_UNLIKELY (clutter_paint_debug_flags & CLUTTER_DEBUG_CONTINUOUS_REDRAW))
g_warning ("Continuous redraw is not supported with the GDK backend.");
}