mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
icontheme: Add profiler marks around icon theme loading
This is happening during the first frame.
This commit is contained in:
parent
9b29da93b6
commit
4ac8011126
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user