mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Allow filtering zones in on-demand mode.
This commit is contained in:
parent
1f0d1fdfdc
commit
1a8518dcc2
@ -1746,7 +1746,7 @@ TracyCZoneCtx ___tracy_emit_zone_begin( const struct ___tracy_source_location_da
|
|||||||
{
|
{
|
||||||
___tracy_c_zone_context ctx;
|
___tracy_c_zone_context ctx;
|
||||||
#ifdef TRACY_ON_DEMAND
|
#ifdef TRACY_ON_DEMAND
|
||||||
ctx.active = tracy::s_profiler.IsConnected();
|
ctx.active = active && tracy::s_profiler.IsConnected();
|
||||||
#else
|
#else
|
||||||
ctx.active = active;
|
ctx.active = active;
|
||||||
#endif
|
#endif
|
||||||
@ -1773,7 +1773,7 @@ TracyCZoneCtx ___tracy_emit_zone_begin_callstack( const struct ___tracy_source_l
|
|||||||
{
|
{
|
||||||
___tracy_c_zone_context ctx;
|
___tracy_c_zone_context ctx;
|
||||||
#ifdef TRACY_ON_DEMAND
|
#ifdef TRACY_ON_DEMAND
|
||||||
ctx.active = tracy::s_profiler.IsConnected();
|
ctx.active = active && tracy::s_profiler.IsConnected();
|
||||||
#else
|
#else
|
||||||
ctx.active = active;
|
ctx.active = active;
|
||||||
#endif
|
#endif
|
||||||
|
@ -17,7 +17,7 @@ class ScopedZone
|
|||||||
public:
|
public:
|
||||||
tracy_force_inline ScopedZone( const SourceLocationData* srcloc, bool is_active = true )
|
tracy_force_inline ScopedZone( const SourceLocationData* srcloc, bool is_active = true )
|
||||||
#ifdef TRACY_ON_DEMAND
|
#ifdef TRACY_ON_DEMAND
|
||||||
: m_active( s_profiler.IsConnected() )
|
: m_active( is_active && s_profiler.IsConnected() )
|
||||||
#else
|
#else
|
||||||
: m_active( is_active )
|
: m_active( is_active )
|
||||||
#endif
|
#endif
|
||||||
@ -44,7 +44,7 @@ public:
|
|||||||
|
|
||||||
tracy_force_inline ScopedZone( const SourceLocationData* srcloc, int depth, bool is_active = true )
|
tracy_force_inline ScopedZone( const SourceLocationData* srcloc, int depth, bool is_active = true )
|
||||||
#ifdef TRACY_ON_DEMAND
|
#ifdef TRACY_ON_DEMAND
|
||||||
: m_active( s_profiler.IsConnected() )
|
: m_active( is_active && s_profiler.IsConnected() )
|
||||||
#else
|
#else
|
||||||
: m_active( is_active )
|
: m_active( is_active )
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user