projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b29da9
)
icontheme: Add profiler marks around icon theme loading
author
Matthias Clasen
<mclasen@redhat.com>
Thu, 23 Jan 2020 02:31:08 +0000
(21:31 -0500)
committer
Matthias Clasen
<mclasen@redhat.com>
Thu, 23 Jan 2020 04:44:01 +0000
(23:44 -0500)
This is happening during the first frame.
gtk/gtkicontheme.c
patch
|
blob
|
history
diff --git
a/gtk/gtkicontheme.c
b/gtk/gtkicontheme.c
index 25f010d6446dee71f1a41d8479977665d8a77a80..38a0bd276198a516add0bbddb79632dd0cd1d322 100644
(file)
--- 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;
}