diff options
-rw-r--r-- | gtk/gtkcssnode.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/gtk/gtkcssnode.c b/gtk/gtkcssnode.c index ebc65a8d43..24c11ddb5f 100644 --- a/gtk/gtkcssnode.c +++ b/gtk/gtkcssnode.c @@ -1359,17 +1359,14 @@ gtk_css_node_validate (GtkCssNode *cssnode) gtk_css_node_validate_internal (cssnode, &filter, timestamp); - if (cssnode->parent == NULL) + if (gdk_profiler_is_running ()) { - if (gdk_profiler_is_running ()) - { - gint64 after = g_get_monotonic_time (); - gdk_profiler_add_mark (before * 1000, (after - before) * 1000, "css validation", ""); - gdk_profiler_set_int_counter (invalidated_nodes_counter, after * 1000, invalidated_nodes); - gdk_profiler_set_int_counter (created_styles_counter, after * 1000, created_styles); - invalidated_nodes = 0; - created_styles = 0; - } + gint64 after = g_get_monotonic_time (); + gdk_profiler_add_mark (before * 1000, (after - before) * 1000, "css validation", ""); + gdk_profiler_set_int_counter (invalidated_nodes_counter, after * 1000, invalidated_nodes); + gdk_profiler_set_int_counter (created_styles_counter, after * 1000, created_styles); + invalidated_nodes = 0; + created_styles = 0; } } |