gtkcssprovider: Use g_file_peek_path to get the uri for the sysprof marker
This avoids an extra allocation. Additionally avoid calling it if file is already null.
This commit is contained in:
@@ -1267,9 +1267,9 @@ gtk_css_provider_load_internal (GtkCssProvider *self,
|
||||
|
||||
if (GDK_PROFILER_IS_RUNNING)
|
||||
{
|
||||
char *uri = g_file_get_uri (file);
|
||||
const char *uri G_GNUC_UNUSED;
|
||||
uri = file ? g_file_peek_path (file) : NULL;
|
||||
gdk_profiler_end_mark (before, "CSS theme load", uri);
|
||||
g_free (uri);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user