csscomputedvalues: Handle starting animations differently

This commit is contained in:
Benjamin Otte 2012-09-16 19:07:40 +02:00
parent bf19d89510
commit e2cc9f3afc
3 changed files with 26 additions and 28 deletions

View File

@ -364,7 +364,7 @@ gtk_css_computed_values_find_transition (GtkCssComputedValues *values,
}
static void
gtk_css_computed_values_start_transitions (GtkCssComputedValues *values,
gtk_css_computed_values_create_css_transitions (GtkCssComputedValues *values,
gint64 timestamp,
GtkCssComputedValues *source)
{
@ -432,7 +432,7 @@ gtk_css_computed_values_find_animation (GtkCssComputedValues *values,
}
static void
gtk_css_computed_values_start_css_animations (GtkCssComputedValues *values,
gtk_css_computed_values_create_css_animations (GtkCssComputedValues *values,
gint64 timestamp,
GtkStyleContext *context)
{
@ -487,18 +487,13 @@ gtk_css_computed_values_start_css_animations (GtkCssComputedValues *values,
/* PUBLIC API */
void
_gtk_css_computed_values_start_animations (GtkCssComputedValues *values,
_gtk_css_computed_values_create_animations (GtkCssComputedValues *values,
gint64 timestamp,
GtkCssComputedValues *source,
GtkStyleContext *context)
{
GtkBitmask *ignore;
gtk_css_computed_values_start_transitions (values, timestamp, source);
gtk_css_computed_values_start_css_animations (values, timestamp, context);
ignore = _gtk_css_computed_values_advance (values, timestamp);
_gtk_bitmask_free (ignore);
gtk_css_computed_values_create_css_transitions (values, timestamp, source);
gtk_css_computed_values_create_css_animations (values, timestamp, context);
}
GtkBitmask *

View File

@ -88,7 +88,7 @@ GtkCssValue * _gtk_css_computed_values_get_intrinsic_value (GtkCssCom
GtkBitmask * _gtk_css_computed_values_get_difference (GtkCssComputedValues *values,
GtkCssComputedValues *other);
void _gtk_css_computed_values_start_animations (GtkCssComputedValues *values,
void _gtk_css_computed_values_create_animations (GtkCssComputedValues *values,
gint64 timestamp,
GtkCssComputedValues *source,
GtkStyleContext *context);

View File

@ -3041,7 +3041,7 @@ gtk_style_context_should_animate (GtkStyleContext *context)
}
static void
gtk_style_context_start_animations (GtkStyleContext *context,
gtk_style_context_create_animations (GtkStyleContext *context,
GtkCssComputedValues *values,
GtkCssComputedValues *previous,
gint64 timestamp)
@ -3052,7 +3052,7 @@ gtk_style_context_start_animations (GtkStyleContext *context,
return;
}
_gtk_css_computed_values_start_animations (values,
_gtk_css_computed_values_create_animations (values,
timestamp,
previous,
context);
@ -3168,8 +3168,11 @@ _gtk_style_context_validate (GtkStyleContext *context,
data = style_data_lookup (context);
gtk_style_context_start_animations (context, data->store, current->store, timestamp);
gtk_style_context_create_animations (context, data->store, current->store, timestamp);
if (_gtk_css_computed_values_is_static (data->store))
change &= ~GTK_CSS_CHANGE_ANIMATE;
else
change |= GTK_CSS_CHANGE_ANIMATE;
changes = _gtk_css_computed_values_get_difference (data->store, current->store);
}