diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index 25f010d644..38a0bd2761 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -1363,6 +1363,7 @@ ensure_valid_themes (GtkIconTheme *self) { GTimeVal tv; gboolean was_valid = self->themes_valid; + gint64 before = g_get_monotonic_time (); if (self->loading_themes) return; @@ -1389,6 +1390,9 @@ ensure_valid_themes (GtkIconTheme *self) queue_theme_changed (self); } + if (gdk_profiler_is_running ()) + gdk_profiler_add_mark (before * 1000, (g_get_monotonic_time () - before) * 1000, "icon theme load", NULL); + self->loading_themes = FALSE; }