diff --git a/clutter/clutter-master-clock.c b/clutter/clutter-master-clock.c index 2a7e53124..a417dbbca 100644 --- a/clutter/clutter-master-clock.c +++ b/clutter/clutter-master-clock.c @@ -356,7 +356,7 @@ _clutter_master_clock_advance (ClutterMasterClock *master_clock) ClutterTimeline *timeline = l->data; if (clutter_timeline_is_playing (timeline)) - _clutter_timeline_set_delta (timeline, msecs); + clutter_timeline_advance_delta (timeline, msecs); } master_clock->msecs_delta = msecs; diff --git a/clutter/clutter-private.h b/clutter/clutter-private.h index 9f89312a3..e669a640b 100644 --- a/clutter/clutter-private.h +++ b/clutter/clutter-private.h @@ -207,9 +207,6 @@ guint _clutter_pixel_to_id (guchar pixel[4]); void _clutter_id_to_color (guint id, ClutterColor *col); -void _clutter_timeline_set_delta (ClutterTimeline *timeline, - guint msecs); - /* use this function as the accumulator if you have a signal with * a G_TYPE_BOOLEAN return value; this will stop the emission as * soon as one handler returns TRUE diff --git a/clutter/clutter-timeline.c b/clutter/clutter-timeline.c index 57b517cef..9e000702f 100644 --- a/clutter/clutter-timeline.c +++ b/clutter/clutter-timeline.c @@ -1022,21 +1022,19 @@ clutter_timeline_set_speed (ClutterTimeline *timeline, if (priv->fps != fps) { - g_object_ref (timeline); + g_object_freeze_notify (G_OBJECT (timeline)); priv->fps = fps; priv->frame_interval = 1000 / priv->fps; - /* FIXME if the timeline is playing restart */ - - g_object_freeze_notify (G_OBJECT (timeline)); + /* if the timeline is playing restart */ + if (priv->is_playing) + clutter_timeline_rewind (timeline); g_object_notify (G_OBJECT (timeline), "duration"); g_object_notify (G_OBJECT (timeline), "fps"); g_object_thaw_notify (G_OBJECT (timeline)); - - g_object_unref (timeline); } } @@ -1372,7 +1370,7 @@ clutter_timeline_get_delta (ClutterTimeline *timeline, } /* - * clutter_timeline_set_delta: + * clutter_timeline_advance_delta: * @timeline: a #ClutterTimeline * @msecs: advance in milliseconds * @@ -1383,8 +1381,8 @@ clutter_timeline_get_delta (ClutterTimeline *timeline, * skip frames. */ void -_clutter_timeline_set_delta (ClutterTimeline *timeline, - guint msecs) +clutter_timeline_advance_delta (ClutterTimeline *timeline, + guint msecs) { ClutterTimelinePrivate *priv; diff --git a/clutter/clutter-timeline.h b/clutter/clutter-timeline.h index bd8a90151..7d829ebaa 100644 --- a/clutter/clutter-timeline.h +++ b/clutter/clutter-timeline.h @@ -166,6 +166,10 @@ gboolean clutter_timeline_has_marker (ClutterTimeline *timeli void clutter_timeline_advance_to_marker (ClutterTimeline *timeline, const gchar *marker_name); +/*< private >*/ +void clutter_timeline_advance_delta (ClutterTimeline *timeline, + guint msecs); + G_END_DECLS #endif /* _CLUTTER_TIMELINE_H__ */