From: Neil Roberts Date: Thu, 30 Apr 2009 17:47:59 +0000 (+0100) Subject: Accumulate small deltas X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa9efe4828834a62b694232d61124f4b0703d922;p=profile%2Fivi%2Fclutter.git Accumulate small deltas The clutter frame source tries to average out the frame deltas so that if one frame takes 1 interval plus a little bit of extra time then the next frame will be 1 interval minus that little bit of extra time. Therefore the deltas can sometimes be less than the frame interval. ClutterTimeline should accumulate these small differences otherwise it will end up missing out frames so the total duration of the timeline will be a lot longer. For example this was causing test-actors to appear to run very slow. --- diff --git a/clutter/clutter-timeline.c b/clutter/clutter-timeline.c index 9e00070..e21a5ec 100644 --- a/clutter/clutter-timeline.c +++ b/clutter/clutter-timeline.c @@ -1398,7 +1398,9 @@ clutter_timeline_advance_delta (ClutterTimeline *timeline, { clutter_timeline_advance_internal (timeline); - priv->msecs_delta = 0; + /* Keep the remainder of the frame time so that it will be + counted towards the next time if the delta is short */ + priv->msecs_delta %= priv->frame_interval; } }