mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -05:00
2007-11-19 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-timeline.c (timeline_timeout_func): Do not emit the ::new-frame signal twice for the last frame. (#531)
This commit is contained in:
parent
990d0e90a5
commit
976df38630
@ -1,3 +1,8 @@
|
||||
2007-11-19 Emmanuele Bassi <ebassi@openedhand.com>
|
||||
|
||||
* clutter/clutter-timeline.c (timeline_timeout_func): Do not emit the
|
||||
::new-frame signal twice for the last frame. (#531)
|
||||
|
||||
2007-11-19 Øyvind Kolås <pippin@o-hand.com>
|
||||
|
||||
* clutter/clutter-actor.[ch]: (clutter_actor_set_rotationx),
|
||||
|
@ -537,30 +537,31 @@ timeline_timeout_func (gpointer data)
|
||||
((priv->direction == CLUTTER_TIMELINE_BACKWARD) &&
|
||||
(priv->current_frame_num < 0)))
|
||||
{
|
||||
guint frame_diff;
|
||||
|
||||
CLUTTER_NOTE (SCHEDULER,
|
||||
"Timeline [%p] completed (cur: %d, tot: %d, drop: %d)",
|
||||
timeline,
|
||||
priv->current_frame_num,
|
||||
priv->n_frames,
|
||||
n_frames - 1);
|
||||
guint frame_diff = 0;
|
||||
|
||||
if (priv->direction == CLUTTER_TIMELINE_FORWARD)
|
||||
{
|
||||
frame_diff = priv->current_frame_num - priv->n_frames;
|
||||
priv->current_frame_num = priv->n_frames;
|
||||
}
|
||||
else
|
||||
else if (priv->direction == CLUTTER_TIMELINE_BACKWARD)
|
||||
{
|
||||
frame_diff = priv->n_frames - priv->current_frame_num;
|
||||
frame_diff = priv->current_frame_num * -1;
|
||||
priv->current_frame_num = 0;
|
||||
}
|
||||
|
||||
CLUTTER_NOTE (SCHEDULER,
|
||||
"Timeline [%p] completed (cur: %d, tot: %d, drop: %d, diff: %d)",
|
||||
timeline,
|
||||
priv->current_frame_num,
|
||||
priv->n_frames,
|
||||
n_frames - 1,
|
||||
frame_diff);
|
||||
|
||||
/* if we skipped some frame to get here let's see whether we still need
|
||||
* to emit the last new-frame signal with the last frame
|
||||
*/
|
||||
if (frame_diff)
|
||||
if (frame_diff > 1)
|
||||
{
|
||||
g_signal_emit (timeline, timeline_signals[NEW_FRAME], 0,
|
||||
priv->current_frame_num);
|
||||
|
Loading…
Reference in New Issue
Block a user