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 /gdk/gdkdrawcontext.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 'gdk/gdkdrawcontext.c')
-rw-r--r-- | gdk/gdkdrawcontext.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdk/gdkdrawcontext.c b/gdk/gdkdrawcontext.c index 5c25d87407..35a7fea282 100644 --- a/gdk/gdkdrawcontext.c +++ b/gdk/gdkdrawcontext.c @@ -383,7 +383,7 @@ gdk_draw_context_end_frame (GdkDrawContext *context) GDK_DRAW_CONTEXT_GET_CLASS (context)->end_frame (context, priv->frame_region); #ifdef G_ENABLE_DEBUG - if (gdk_profiler_is_running ()) + if (GDK_PROFILER_IS_RUNNING) gdk_profiler_set_int_counter (pixels_counter, g_get_monotonic_time (), region_get_pixels (priv->frame_region)); |