[gtk/wip/baedert/for-master: 20/30] cssanimatedstyle: Keep transition_info_add from recursing
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 20/30] cssanimatedstyle: Keep transition_info_add from recursing
- Date: Sat, 24 Aug 2019 06:55:12 +0000 (UTC)
commit d4953e5da447b1c6c4a5c58366896f2da8ecc5f3
Author: Timm Bäder <mail baedert org>
Date: Thu Aug 22 13:14:57 2019 +0200
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.
gtk/gtkcssanimatedstyle.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]