mirror of
https://github.com/brl/mutter.git
synced 2024-11-09 15:37:00 -05:00
compositor: Add COGL_HAS_TRACING checks around tracing code
This code sneaked unconditionally, even though we can disable tracing code with -Dprofiler=false. Add some COGL_HAS_TRACING checks so that this code is also optionally built. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1951>
This commit is contained in:
parent
a4c50ad123
commit
a42c470efd
@ -190,6 +190,7 @@ do_send_frame_drawn (MetaWindowActorX11 *actor_x11,
|
||||
XFlush (xdisplay);
|
||||
meta_x11_error_trap_pop (display->x11_display);
|
||||
|
||||
#ifdef COGL_HAS_TRACING
|
||||
if (G_UNLIKELY (cogl_is_tracing_enabled ()))
|
||||
{
|
||||
g_autofree char *description = NULL;
|
||||
@ -202,6 +203,7 @@ do_send_frame_drawn (MetaWindowActorX11 *actor_x11,
|
||||
description);
|
||||
COGL_TRACE_END (MetaWindowActorX11FrameDrawn);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
@ -251,6 +253,7 @@ do_send_frame_timings (MetaWindowActorX11 *actor_x11,
|
||||
XFlush (xdisplay);
|
||||
meta_x11_error_trap_pop (display->x11_display);
|
||||
|
||||
#ifdef COGL_HAS_TRACING
|
||||
if (G_UNLIKELY (cogl_is_tracing_enabled ()))
|
||||
{
|
||||
g_autofree char *description = NULL;
|
||||
@ -265,6 +268,7 @@ do_send_frame_timings (MetaWindowActorX11 *actor_x11,
|
||||
COGL_TRACE_DESCRIBE (MetaWindowActorX11FrameTimings, description);
|
||||
COGL_TRACE_END (MetaWindowActorX11FrameTimings);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user