mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-07 01:00:28 +00:00
csscomputedvalues: Handle starting animations differently
This commit is contained in:
parent
bf19d89510
commit
e2cc9f3afc
@ -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 *
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user