clutter-timeline: Emit the new-frame signal even on the first frame
authorNeil Roberts <neil@linux.intel.com>
Mon, 24 Jan 2011 11:29:59 +0000 (11:29 +0000)
committerNeil Roberts <neil@linux.intel.com>
Mon, 24 Jan 2011 11:31:09 +0000 (11:31 +0000)
ClutterTimeline has special handling for the first time do_tick is
called which was not emitting a new-frame signal. This meant that an
application which directly uses the timeline would have to manually
setup the initial state of an animation after starting a timeline to
avoid painting a single frame with the wrong state. It seems to make
more sense to instead emit the new-frame signal so that the
application always sees a new-frame when the progress changes before a
paint.

clutter/clutter-timeline.c

index 165e2c5..a2db02f 100644 (file)
@@ -1264,7 +1264,9 @@ _clutter_timeline_do_tick (ClutterTimeline *timeline,
   if (priv->waiting_first_tick)
     {
       priv->last_frame_time = tick_time;
+      priv->msecs_delta = 0;
       priv->waiting_first_tick = FALSE;
+      clutter_timeline_do_frame (timeline);
     }
   else
     {