animation: Don't set the changed properties anymore

The code is not needed anymore. And it looked wrong, too, so I'm glad
it's gone.
This commit is contained in:
Benjamin Otte 2012-09-16 18:56:32 +02:00
parent 2147473131
commit bf19d89510
5 changed files with 14 additions and 32 deletions

View File

@ -97,9 +97,8 @@ gtk_css_animation_get_progress_from_iteration (GtkCssAnimation *animation,
}
}
static GtkBitmask *
static void
gtk_css_animation_set_values (GtkStyleAnimation *style_animation,
GtkBitmask *changed,
gint64 for_time_us,
GtkCssComputedValues *values)
{
@ -110,7 +109,7 @@ gtk_css_animation_set_values (GtkStyleAnimation *style_animation,
iteration = gtk_css_animation_get_iteration (animation, for_time_us);
if (!gtk_css_animation_is_executing_at_iteration (animation, iteration))
return changed;
return;
progress = gtk_css_animation_get_progress_from_iteration (animation, iteration);
progress = _gtk_css_ease_value_transform (animation->ease, progress);
@ -128,11 +127,7 @@ gtk_css_animation_set_values (GtkStyleAnimation *style_animation,
_gtk_css_computed_values_get_intrinsic_value (values, i));
_gtk_css_computed_values_set_animated_value (values, property_id, value);
_gtk_css_value_unref (value);
changed = _gtk_bitmask_set (changed, property_id, TRUE);
}
return changed;
}
static gboolean

View File

@ -513,8 +513,6 @@ _gtk_css_computed_values_advance (GtkCssComputedValues *values,
g_return_val_if_fail (GTK_IS_CSS_COMPUTED_VALUES (values), NULL);
g_return_val_if_fail (timestamp >= values->current_time, NULL);
changed = _gtk_bitmask_new ();
values->current_time = timestamp;
old_computed_values = values->animated_values;
values->animated_values = NULL;
@ -526,10 +524,9 @@ _gtk_css_computed_values_advance (GtkCssComputedValues *values,
list = list->next;
changed = _gtk_style_animation_set_values (animation,
changed,
timestamp,
GTK_CSS_COMPUTED_VALUES (values));
_gtk_style_animation_set_values (animation,
timestamp,
GTK_CSS_COMPUTED_VALUES (values));
if (_gtk_style_animation_is_finished (animation, timestamp))
{
@ -538,8 +535,6 @@ _gtk_css_computed_values_advance (GtkCssComputedValues *values,
}
}
_gtk_bitmask_free (changed);
/* figure out changes */
changed = _gtk_bitmask_new ();

View File

@ -25,9 +25,8 @@
G_DEFINE_TYPE (GtkCssTransition, _gtk_css_transition, GTK_TYPE_STYLE_ANIMATION)
static GtkBitmask *
static void
gtk_css_transition_set_values (GtkStyleAnimation *animation,
GtkBitmask *changed,
gint64 for_time_us,
GtkCssComputedValues *values)
{
@ -54,8 +53,6 @@ gtk_css_transition_set_values (GtkStyleAnimation *animation,
_gtk_css_computed_values_set_animated_value (values, transition->property, value);
_gtk_css_value_unref (value);
return _gtk_bitmask_set (changed, transition->property, TRUE);
}
static gboolean

View File

@ -23,13 +23,11 @@
G_DEFINE_ABSTRACT_TYPE (GtkStyleAnimation, _gtk_style_animation, G_TYPE_OBJECT)
static GtkBitmask *
static void
gtk_style_animation_real_set_values (GtkStyleAnimation *animation,
GtkBitmask *changed,
gint64 for_time_us,
GtkCssComputedValues *values)
{
return changed;
}
static gboolean
@ -59,20 +57,19 @@ _gtk_style_animation_init (GtkStyleAnimation *animation)
{
}
GtkBitmask *
void
_gtk_style_animation_set_values (GtkStyleAnimation *animation,
GtkBitmask *changed,
gint64 for_time_us,
GtkCssComputedValues *values)
{
GtkStyleAnimationClass *klass;
g_return_val_if_fail (GTK_IS_STYLE_ANIMATION (animation), changed);
g_return_val_if_fail (GTK_IS_CSS_COMPUTED_VALUES (values), changed);
g_return_if_fail (GTK_IS_STYLE_ANIMATION (animation));
g_return_if_fail (GTK_IS_CSS_COMPUTED_VALUES (values));
klass = GTK_STYLE_ANIMATION_GET_CLASS (animation);
return klass->set_values (animation, changed, for_time_us, values);
return klass->set_values (animation, for_time_us, values);
}
gboolean

View File

@ -48,18 +48,16 @@ struct _GtkStyleAnimationClass
gint64 at_time_us);
gboolean (* is_static) (GtkStyleAnimation *animation,
gint64 at_time_us);
GtkBitmask * (* set_values) (GtkStyleAnimation *animation,
GtkBitmask *changed,
void (* set_values) (GtkStyleAnimation *animation,
gint64 for_time_us,
GtkCssComputedValues *values);
};
GType _gtk_style_animation_get_type (void) G_GNUC_CONST;
GtkBitmask * _gtk_style_animation_set_values (GtkStyleAnimation *animation,
GtkBitmask *changed,
void _gtk_style_animation_set_values (GtkStyleAnimation *animation,
gint64 for_time_us,
GtkCssComputedValues *values) G_GNUC_WARN_UNUSED_RESULT;
GtkCssComputedValues *values);
gboolean _gtk_style_animation_is_finished (GtkStyleAnimation *animation,
gint64 at_time_us);
gboolean _gtk_style_animation_is_static (GtkStyleAnimation *animation,