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,9 +364,9 @@ gtk_css_computed_values_find_transition (GtkCssComputedValues *values,
}
static void
gtk_css_computed_values_start_transitions (GtkCssComputedValues *values,
gint64 timestamp,
GtkCssComputedValues *source)
gtk_css_computed_values_create_css_transitions (GtkCssComputedValues *values,
gint64 timestamp,
GtkCssComputedValues *source)
{
TransitionInfo transitions[GTK_CSS_PROPERTY_N_PROPERTIES] = { { 0, } };
GtkCssValue *durations, *delays, *timing_functions;
@ -432,9 +432,9 @@ gtk_css_computed_values_find_animation (GtkCssComputedValues *values,
}
static void
gtk_css_computed_values_start_css_animations (GtkCssComputedValues *values,
gint64 timestamp,
GtkStyleContext *context)
gtk_css_computed_values_create_css_animations (GtkCssComputedValues *values,
gint64 timestamp,
GtkStyleContext *context)
{
GtkStyleProviderPrivate *provider;
GtkCssValue *durations, *delays, *timing_functions, *animations;
@ -487,18 +487,13 @@ gtk_css_computed_values_start_css_animations (GtkCssComputedValues *values,
/* PUBLIC API */
void
_gtk_css_computed_values_start_animations (GtkCssComputedValues *values,
gint64 timestamp,
GtkCssComputedValues *source,
GtkStyleContext *context)
_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,10 +3041,10 @@ gtk_style_context_should_animate (GtkStyleContext *context)
}
static void
gtk_style_context_start_animations (GtkStyleContext *context,
GtkCssComputedValues *values,
GtkCssComputedValues *previous,
gint64 timestamp)
gtk_style_context_create_animations (GtkStyleContext *context,
GtkCssComputedValues *values,
GtkCssComputedValues *previous,
gint64 timestamp)
{
if (!gtk_style_context_should_animate (context))
{
@ -3052,10 +3052,10 @@ gtk_style_context_start_animations (GtkStyleContext *context,
return;
}
_gtk_css_computed_values_start_animations (values,
timestamp,
previous,
context);
_gtk_css_computed_values_create_animations (values,
timestamp,
previous,
context);
if (_gtk_css_computed_values_is_static (values))
{
@ -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);
change &= ~GTK_CSS_CHANGE_ANIMATE;
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);
}