icontheme: Add profiler marks around icon theme loading

This is happening during the first frame.
This commit is contained in:
Matthias Clasen 2020-01-22 21:31:08 -05:00
parent 9b29da93b6
commit 4ac8011126

View File

@ -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;
}