[clutter] gdk: move sync_to_vblank setup from master clock to backend



commit aeb19f2f4dcb6d25093802aaac1878c755dc16be
Author: Lionel Landwerlin <llandwerlin gmail com>
Date:   Sun Sep 13 00:38:56 2015 +0200

    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

 clutter/gdk/clutter-backend-gdk.c      |    5 +++++
 clutter/gdk/clutter-master-clock-gdk.c |    4 ----
 2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/clutter/gdk/clutter-backend-gdk.c b/clutter/gdk/clutter-backend-gdk.c
index fab7bf0..11eeb9c 100644
--- a/clutter/gdk/clutter-backend-gdk.c
+++ b/clutter/gdk/clutter-backend-gdk.c
@@ -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);
 }
 
 /**
diff --git a/clutter/gdk/clutter-master-clock-gdk.c b/clutter/gdk/clutter-master-clock-gdk.c
index 03e37bf..748ba55 100644
--- a/clutter/gdk/clutter-master-clock-gdk.c
+++ b/clutter/gdk/clutter-master-clock-gdk.c
@@ -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.");
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]