mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Send frame marks in on-demand mode.
This commit is contained in:
parent
f8b2ffdc7e
commit
03794a2957
@ -118,7 +118,9 @@ public:
|
|||||||
|
|
||||||
static tracy_force_inline void FrameMark()
|
static tracy_force_inline void FrameMark()
|
||||||
{
|
{
|
||||||
#ifndef TRACY_ON_DEMAND
|
#ifdef TRACY_ON_DEMAND
|
||||||
|
if( !s_profiler.IsConnected() ) return;
|
||||||
|
#endif
|
||||||
Magic magic;
|
Magic magic;
|
||||||
auto& token = s_token.ptr;
|
auto& token = s_token.ptr;
|
||||||
auto& tail = token->get_tail_index();
|
auto& tail = token->get_tail_index();
|
||||||
@ -126,7 +128,6 @@ public:
|
|||||||
MemWrite( &item->hdr.type, QueueType::FrameMarkMsg );
|
MemWrite( &item->hdr.type, QueueType::FrameMarkMsg );
|
||||||
MemWrite( &item->frameMark.time, GetTime() );
|
MemWrite( &item->frameMark.time, GetTime() );
|
||||||
tail.store( magic + 1, std::memory_order_release );
|
tail.store( magic + 1, std::memory_order_release );
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static tracy_force_inline void PlotData( const char* name, int64_t val )
|
static tracy_force_inline void PlotData( const char* name, int64_t val )
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user