[timeline] Remove the concept of frames from timelines

Timelines no longer work in terms of a frame rate and a number of
frames but instead just have a duration in milliseconds. This better
matches the working of the master clock where if any timelines are
running it will redraw as fast as possible rather than limiting to the
lowest rated timeline.

Most applications will just create animations and expect them to
finish in a certain amount of time without caring about how many
frames are drawn. If a frame is going to be drawn it might as well
update all of the animations to some fraction of the total animation
rather than rounding to the nearest whole frame.

The 'frame_num' parameter of the new-frame signal is now 'msecs' which
is a number of milliseconds progressed along the
timeline. Applications should use clutter_timeline_get_progress
instead of the frame number.

Markers can now only be attached at a time value. The position is
stored in milliseconds rather than at a frame number.

test-timeline-smoothness and test-timeline-dup-frames have been
removed because they no longer make sense.
This commit is contained in:
Neil Roberts
2009-06-04 13:05:12 +01:00
parent c20886c5e3
commit 9c7afe0c5b
31 changed files with 324 additions and 914 deletions

View File

@ -61,7 +61,7 @@ static gboolean task (gpointer foo)
for (i=0; i<3; i++)
{
timeline = clutter_timeline_new (60*5, 60);
timeline = clutter_timeline_new (5000);
alpha = clutter_alpha_new_full (timeline, CLUTTER_LINEAR);
depth_behavior = clutter_behaviour_depth_new (alpha, -2500, 0);
clutter_behaviour_apply (depth_behavior, image[i]);