[gtk] icontheme: Add profiler marks for loading icons



commit 95ed9de706b62a17de97f278d4075d4924c78e9a
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jan 22 14:49:17 2020 -0500

    icontheme: Add profiler marks for loading icons
    
    This helps to clearly identify the places where we
    do IO, in profiler traces.

 gtk/gtkicontheme.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index 5de6c07f39..25f010d644 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -50,6 +50,7 @@
 #include "gtkprivate.h"
 #include "gdkpixbufutilsprivate.h"
 #include "gdk/gdktextureprivate.h"
+#include "gdk/gdkprofilerprivate.h"
 
 /* this is in case round() is not provided by the compiler, 
  * such as in the case of C89 compilers, like MSVC
@@ -3243,6 +3244,8 @@ icon_info_ensure_scale_and_texture (GtkIconInfo *icon_info)
         icon_info->scale = (gdouble) scaled_desired_size / (icon_info->dir_size * dir_scale);
     }
 
+  gdk_profiler_add_mark (g_get_monotonic_time () * 1000, 0, "icon load", icon_info->filename);
+
   /* At this point, we need to actually get the icon; either from the
    * builtin image or by loading the file
    */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]