diff options
author | Alexander Larsson <alexl@redhat.com> | 2020-02-12 11:05:01 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2020-02-12 11:05:01 +0100 |
commit | 01d5ad2056f9c896246219eb04ca1ae807a45768 (patch) | |
tree | aecc056b7dd2c2e0911c223fada8ca4e06dfceb3 /gtk/gtkemojichooser.c | |
parent | cc643df88b541b7505885ecff02c8576decf6bbd (diff) | |
download | gtk+-01d5ad2056f9c896246219eb04ca1ae807a45768.tar.gz |
profiler: Make profiler-is-running a macro
When we use if (GDK_PROFILER_IS_RUNNING) this means we get an
inlined if (FALSE) when the compiler support is not compiled in, which
gets rid of all the related code completely.
We also expand to G_UNLIKELY(gdk_profiler_is_running ()) in the supported
case which might cause somewhat better code generation.
Diffstat (limited to 'gtk/gtkemojichooser.c')
-rw-r--r-- | gtk/gtkemojichooser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkemojichooser.c b/gtk/gtkemojichooser.c index a82eaf9e2e..d317cfc0c5 100644 --- a/gtk/gtkemojichooser.c +++ b/gtk/gtkemojichooser.c @@ -465,7 +465,7 @@ populate_emoji_chooser (gpointer data) now = g_get_monotonic_time (); if (now > start + 8000) { - if (gdk_profiler_is_running ()) + if (GDK_PROFILER_IS_RUNNING) gdk_profiler_add_mark (start, (now - start), "emojichooser", "populate"); return G_SOURCE_CONTINUE; } @@ -476,7 +476,7 @@ populate_emoji_chooser (gpointer data) chooser->box = NULL; chooser->populate_idle = 0; - if (gdk_profiler_is_running ()) + if (GDK_PROFILER_IS_RUNNING) { now = g_get_monotonic_time (); gdk_profiler_add_mark (start, (now - start), "emojichooser", "populate (finish)"); |