Commit d785820c authored by Benjamin Otte's avatar Benjamin Otte

cssnode: Change the way we invalidate timestamps

Do not propagate the TIMESTAMP change through the node tree, as that
causes lots of uneeded markings of nodes as invalid.

Instead, walk the node tree and find the nodes that have a non-static
style and only invalidate timestamps on those.
parent 759d8daf
......@@ -841,6 +841,23 @@ gtk_css_node_invalidate_style_provider (GtkCssNode *cssnode)
static void
gtk_css_node_invalidate_timestamp (GtkCssNode *cssnode)
GtkCssNode *child;
if (!cssnode->invalid)
if (!gtk_css_style_is_static (cssnode->style))
gtk_css_node_invalidate (cssnode, GTK_CSS_CHANGE_TIMESTAMP);
for (child = cssnode->first_child; child; child = child->next_sibling)
gtk_css_node_invalidate_timestamp (child);
gtk_css_node_invalidate_frame_clock (GtkCssNode *cssnode,
gboolean just_timestamp)
......@@ -849,10 +866,10 @@ gtk_css_node_invalidate_frame_clock (GtkCssNode *cssnode,
if (cssnode->parent)
if (just_timestamp)
gtk_css_node_invalidate (cssnode, GTK_CSS_CHANGE_TIMESTAMP);
gtk_css_node_invalidate (cssnode, GTK_CSS_CHANGE_TIMESTAMP | GTK_CSS_CHANGE_ANIMATIONS);
gtk_css_node_invalidate_timestamp (cssnode);
if (!just_timestamp)
gtk_css_node_invalidate (cssnode, GTK_CSS_CHANGE_ANIMATIONS);
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