mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
[clutter-timeline] Remove the code for backwards timelines in get_progress
The special check to invert the progress when the timeline direction is backwards is not necessary because the actual frame number will be decreasing in that case. Inverting just makes it progress forwards again. This is more apparent since the float-alpha-value branch merge because the clutter_linear function directly returns the value from get_progress. For example in test-depth, the animations loop instead of oscillating back and forth.
This commit is contained in:
parent
d64ff5c9f0
commit
4d7caa4bd5
@ -1373,9 +1373,6 @@ clutter_timeline_get_progressx (ClutterTimeline *timeline)
|
||||
progress = CLUTTER_FIXED_DIV ((float)(priv->current_frame_num),
|
||||
(float)(priv->n_frames));
|
||||
|
||||
if (priv->direction == CLUTTER_TIMELINE_BACKWARD)
|
||||
progress = 1.0 - progress;
|
||||
|
||||
return progress;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user