Commit f4354316 authored by Benjamin Otte's avatar Benjamin Otte

cssnode: Add optimization

Don't even try to propagate changes when we know there are none.
parent 29544173
......@@ -579,6 +579,9 @@ gtk_css_node_propagate_pending_changes (GtkCssNode *cssnode,
if (style_changed)
change |= GTK_CSS_CHANGE_PARENT_STYLE;
if (!cssnode->invalid && change == 0)
return;
for (child = gtk_css_node_get_first_child (cssnode);
child;
child = gtk_css_node_get_next_sibling (child))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment