summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-01-22 21:31:08 -0500
committerMatthias Clasen <mclasen@redhat.com>2020-01-22 23:44:01 -0500
commit4ac8011126fab9ad1d432fa70dead55d6fbffdf4 (patch)
tree316e2be653aeac681dadeb18be74de8b754eaf63
parent9b29da93b6ee90f99c4a49e84b2bbb81e9cd3357 (diff)
downloadgtk+-4ac8011126fab9ad1d432fa70dead55d6fbffdf4.tar.gz
icontheme: Add profiler marks around icon theme loading
This is happening during the first frame.
-rw-r--r--gtk/gtkicontheme.c4
1 files changed, 4 insertions, 0 deletions
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;
}