Revert commit 762873e7
The commit 762873e79e
is completely
and utterly wrong and I should have never pushed it.
Serves me well for trying to work on three different branches and
on three different things.
This commit is contained in:
parent
762873e79e
commit
181ba67114
@ -68,11 +68,6 @@ struct _ClutterMasterClock
|
||||
* after the last timeline has been completed
|
||||
*/
|
||||
guint last_advance : 1;
|
||||
|
||||
/* a guard, so that we dispatch the redraws only if
|
||||
* any timeline did advance
|
||||
*/
|
||||
guint has_advanced : 1;
|
||||
};
|
||||
|
||||
struct _ClutterMasterClockClass
|
||||
@ -213,17 +208,6 @@ clutter_clock_dispatch (GSource *source,
|
||||
|
||||
CLUTTER_NOTE (SCHEDULER, "Master clock [tick]");
|
||||
|
||||
/* do not force a redraw if no timeline has advanced; this might
|
||||
* happen if we only have timelines with intervals smaller than
|
||||
* the vblank interval
|
||||
*/
|
||||
if (master_clock->has_advanced)
|
||||
{
|
||||
master_clock->has_advanced = FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
stages = clutter_stage_manager_peek_stages (stage_manager);
|
||||
|
||||
/* queue a redraw for each stage; this will advance each timeline
|
||||
@ -454,7 +438,6 @@ void
|
||||
_clutter_master_clock_advance (ClutterMasterClock *master_clock)
|
||||
{
|
||||
GTimeVal cur_tick = { 0, };
|
||||
gboolean has_advanced;
|
||||
gulong msecs;
|
||||
GSList *l;
|
||||
|
||||
@ -478,13 +461,12 @@ _clutter_master_clock_advance (ClutterMasterClock *master_clock)
|
||||
g_slist_length (master_clock->timelines),
|
||||
msecs);
|
||||
|
||||
has_advanced = FALSE;
|
||||
for (l = master_clock->timelines; l != NULL; l = l->next)
|
||||
{
|
||||
ClutterTimeline *timeline = l->data;
|
||||
|
||||
if (clutter_timeline_is_playing (timeline))
|
||||
has_advanced = clutter_timeline_advance_delta (timeline, msecs);
|
||||
clutter_timeline_advance_delta (timeline, msecs);
|
||||
}
|
||||
|
||||
/* store the previous state so that we can use
|
||||
@ -492,5 +474,4 @@ _clutter_master_clock_advance (ClutterMasterClock *master_clock)
|
||||
*/
|
||||
master_clock->msecs_delta = msecs;
|
||||
master_clock->prev_tick = cur_tick;
|
||||
master_clock->has_advanced = has_advanced;
|
||||
}
|
||||
|
@ -1381,23 +1381,21 @@ clutter_timeline_get_delta (ClutterTimeline *timeline,
|
||||
* elapsed since the last redraw operation. The @timeline will use this
|
||||
* interval to emit the #ClutterTimeline::new-frame signal and eventually
|
||||
* skip frames.
|
||||
*
|
||||
* Return value: %TRUE if the timeline advanced
|
||||
*/
|
||||
gboolean
|
||||
void
|
||||
clutter_timeline_advance_delta (ClutterTimeline *timeline,
|
||||
guint msecs)
|
||||
{
|
||||
ClutterTimelinePrivate *priv;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_TIMELINE (timeline), FALSE);
|
||||
g_return_if_fail (CLUTTER_IS_TIMELINE (timeline));
|
||||
|
||||
priv = timeline->priv;
|
||||
|
||||
priv->msecs_delta += msecs;
|
||||
|
||||
if (priv->msecs_delta < priv->frame_interval)
|
||||
return FALSE;
|
||||
return;
|
||||
else
|
||||
{
|
||||
clutter_timeline_advance_internal (timeline);
|
||||
@ -1405,8 +1403,6 @@ clutter_timeline_advance_delta (ClutterTimeline *timeline,
|
||||
/* 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;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -167,7 +167,7 @@ void clutter_timeline_advance_to_marker (ClutterTimeline *timeli
|
||||
const gchar *marker_name);
|
||||
|
||||
/*< private >*/
|
||||
gboolean clutter_timeline_advance_delta (ClutterTimeline *timeline,
|
||||
void clutter_timeline_advance_delta (ClutterTimeline *timeline,
|
||||
guint msecs);
|
||||
|
||||
G_END_DECLS
|
||||
|
Loading…
Reference in New Issue
Block a user