diff options
author | Benjamin Otte <otte@redhat.com> | 2016-02-18 23:55:00 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2016-02-18 23:57:39 +0100 |
commit | a3ba7f0a201ad9025a926aacb4229865ea724b01 (patch) | |
tree | 3a35f741e382b3b8e932072c4ba7c99950c023b6 /gtk/gtkcssanimatedstyle.c | |
parent | 11b3efbddaac76e03268454ff03a0b9aa5875cf1 (diff) | |
download | gtk+-a3ba7f0a201ad9025a926aacb4229865ea724b01.tar.gz |
css: Don't start transitions when the value didn't change
This stops us from starting a lot of useless transitions. And it's even
conformant with the CSS spec!
Diffstat (limited to 'gtk/gtkcssanimatedstyle.c')
-rw-r--r-- | gtk/gtkcssanimatedstyle.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkcssanimatedstyle.c b/gtk/gtkcssanimatedstyle.c index d13403aaa8..2c92fa7463 100644 --- a/gtk/gtkcssanimatedstyle.c +++ b/gtk/gtkcssanimatedstyle.c @@ -294,6 +294,10 @@ gtk_css_animated_style_create_css_transitions (GSList *animations, } } + if (_gtk_css_value_equal (gtk_css_style_get_value (source, i), + gtk_css_style_get_value (base_style, i))) + continue; + animation = _gtk_css_transition_new (i, gtk_css_style_get_value (source, i), _gtk_css_array_value_get_nth (timing_functions, i), |