mirror of
https://github.com/brl/mutter.git
synced 2024-11-13 01:36:10 -05:00
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.
This commit is contained in:
parent
cf28c023a0
commit
fa9efe4828
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user