stylechange: Do the right thing when old and new style are equal

We don't need to compare all their CSS values to figure out that nothing
changed. We know that.
This commit is contained in:
Benjamin Otte 2016-01-16 23:15:11 +01:00
parent c904efef53
commit 6e6cbd7316

View File

@ -33,6 +33,10 @@ gtk_css_style_change_init (GtkCssStyleChange *change,
change->affects = 0; change->affects = 0;
change->changes = _gtk_bitmask_new (); change->changes = _gtk_bitmask_new ();
/* Make sure we don't do extra work if old and new are equal. */
if (old_style == new_style)
change->n_compared = GTK_CSS_PROPERTY_N_PROPERTIES;
} }
void void