This is also time spent before the first frame.
#include <stdlib.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
+#include "gdk/gdkprofilerprivate.h"
#include <cairo-gobject.h>
/**
GFile *file,
GBytes *bytes)
{
+ gint64 before = g_get_monotonic_time ();
+
if (bytes == NULL)
{
GError *load_error = NULL;
g_bytes_unref (bytes);
}
+
+ if (gdk_profiler_is_running ())
+ {
+ char *uri = g_file_get_uri (file);
+ gdk_profiler_add_mark (before * 1000, (g_get_monotonic_time () - before) * 1000, "theme load", uri);
+ g_free (uri);
+ }
}
/**