clutter: Simplify clutter_state_change

clutter_state_get_animator now always returns NULL, because
_set_animator is never called.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/452
This commit is contained in:
Adam Jackson 2019-02-20 12:11:46 -05:00 committed by Georges Basile Stavracas Neto
parent 73ce5b3a8d
commit 7f3fda6df6

View File

@ -649,7 +649,6 @@ clutter_state_change (ClutterState *state,
gboolean animate)
{
ClutterStatePrivate *priv;
ClutterAnimator *animator;
State *new_state;
guint duration;
GList *k;
@ -718,23 +717,6 @@ clutter_state_change (ClutterState *state,
return NULL;
}
animator = clutter_state_get_animator (state,
priv->source_state_name,
priv->target_state_name);
priv->target_state = new_state;
if (animator == NULL && new_state->keys == NULL)
animator = clutter_state_get_animator (state, NULL,
priv->target_state_name);
if (animator != NULL)
{
/* we've got an animator overriding the tweened animation */
priv->current_animator = animator;
clutter_animator_set_timeline (animator, priv->timeline);
}
else
{
for (k = new_state->keys; k != NULL; k = k->next)
{
ClutterStateKey *key = k->data;
@ -767,7 +749,6 @@ clutter_state_change (ClutterState *state,
g_value_unset (&initial);
}
}
if (!animate)
{