cssimage: Don't start a transition if the start and end are the same

Since a lot of Adwaita sets transition: all, it's easy to end up in a
state where we're making dummy transitions for all of the icons, most of
which we'll never be showing.
This commit is contained in:
Jasper St. Pierre 2015-08-02 12:35:45 -07:00
parent 142efd186d
commit ce75c835e1

View File

@ -87,6 +87,8 @@ gtk_css_image_real_transition (GtkCssImage *start,
return g_object_ref (start);
else if (progress >= 1.0)
return end ? g_object_ref (end) : NULL;
else if (_gtk_css_image_equal (start, end))
return g_object_ref (start);
else
return _gtk_css_image_cross_fade_new (start, end, progress);
}