summaryrefslogtreecommitdiff
path: root/gtk/gtkcssanimatedstyle.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2019-08-22 13:14:57 +0200
committerTimm Bäder <mail@baedert.org>2019-09-09 17:36:24 +0200
commitceb8aedf974fe1037e13735a6761b26713454369 (patch)
treecb3ed3f41deebf3fe8242f47e981834ad63bc69a /gtk/gtkcssanimatedstyle.c
parent0cf4eb379fa4a0aca0239c3893c4f29f08728656 (diff)
downloadgtk+-ceb8aedf974fe1037e13735a6761b26713454369.tar.gz
cssanimatedstyle: Keep transition_info_add from recursing
The slowest part of that fuction is the type check for GtkCssShorthandProperty. Subproperties of shorthand properties never refer to more shorthand properties however, so we don't want to have the type check for those.
Diffstat (limited to 'gtk/gtkcssanimatedstyle.c')
-rw-r--r--gtk/gtkcssanimatedstyle.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk/gtkcssanimatedstyle.c b/gtk/gtkcssanimatedstyle.c
index ece7037bc6..4aa82c0fe9 100644
--- a/gtk/gtkcssanimatedstyle.c
+++ b/gtk/gtkcssanimatedstyle.c
@@ -203,8 +203,14 @@ transition_info_add (TransitionInfo infos[GTK_CSS_PROPERTY_N_PROPERTIES],
for (i = 0; i < len; i++)
{
GtkCssStyleProperty *prop = _gtk_css_shorthand_property_get_subproperty (shorthand, i);
+ guint id;
- transition_info_add (infos, (GtkStyleProperty *)prop, index);
+ if (!_gtk_css_style_property_is_animated ((GtkCssStyleProperty *) prop))
+ continue;
+
+ id = _gtk_css_style_property_get_id ((GtkCssStyleProperty *) prop);
+ infos[id].index = index;
+ infos[id].pending = TRUE;
}
}
else