summaryrefslogtreecommitdiff
path: root/gtk/gtkcssnode.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2020-02-04 23:24:50 +0100
committerBenjamin Otte <otte@redhat.com>2020-02-04 23:24:50 +0100
commit3177ac4270b1f1247f8bcaa3d3a5b62f40fc0247 (patch)
tree459e2f82da5d937ab36511844c8f74391bfa6528 /gtk/gtkcssnode.c
parent903af75fa19e9c5945b5ec52df52bf53c012fd08 (diff)
downloadgtk+-3177ac4270b1f1247f8bcaa3d3a5b62f40fc0247.tar.gz
cssnode: Remove redundant check
We assert that cssnode->parent is NULL, no need to check it again.
Diffstat (limited to 'gtk/gtkcssnode.c')
-rw-r--r--gtk/gtkcssnode.c17
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;
}
}