[gtk: 2/14] Use the new gdk_profiler_add_markf() function



commit 8a1c51db1c056f33382fb2f2573b406a040afbc0
Author: Alexander Larsson <alexl redhat com>
Date:   Wed Feb 12 09:59:03 2020 +0100

    Use the new gdk_profiler_add_markf() function

 gdk/gdksurface.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index 1f554676a5..9725e03bc6 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -4103,15 +4103,9 @@ add_event_mark (GdkEvent *event,
     }
 
   if (kind != NULL && message != NULL)
-    {
-      gchar *full_message = g_strdup_printf ("%s %s", kind, message);
-      gdk_profiler_add_mark (time * 1000L, duration * 1000L, "event", full_message);
-      g_free (full_message);
-    }
+    gdk_profiler_add_markf (time * 1000L, duration * 1000L, "event", "%s %s", kind, message);
   else
-    {
-      gdk_profiler_add_mark (time * 1000L, duration * 1000L, "event", message ? message : kind);
-    }
+    gdk_profiler_add_mark (time * 1000L, duration * 1000L, "event", message ? message : kind);
 
   g_free (message);
 }


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