MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / MessageColor

Method MessageColor

Source/ThirdParty/tracy/client/TracyProfiler.cpp:4206–4228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4204}
4205
4206void Profiler::MessageColor( const char* txt, size_t size, uint32_t color, int32_t callstack_depth )
4207{
4208 assert( size < (std::numeric_limits<uint16_t>::max)() );
4209#ifdef TRACY_ON_DEMAND
4210 if( !GetProfiler().IsConnected() ) return;
4211#endif
4212 if( callstack_depth != 0 && has_callstack() )
4213 {
4214 tracy::GetProfiler().SendCallstack( callstack_depth );
4215 }
4216
4217 auto ptr = (char*)tracy_malloc( size );
4218 memcpy( ptr, txt, size );
4219
4220 TracyQueuePrepare( callstack_depth == 0 ? QueueType::MessageColor : QueueType::MessageColorCallstack );
4221 MemWrite( &item->messageColorFat.time, GetTime() );
4222 MemWrite( &item->messageColorFat.text, (uint64_t)ptr );
4223 MemWrite( &item->messageColorFat.b, uint8_t( ( color ) & 0xFF ) );
4224 MemWrite( &item->messageColorFat.g, uint8_t( ( color >> 8 ) & 0xFF ) );
4225 MemWrite( &item->messageColorFat.r, uint8_t( ( color >> 16 ) & 0xFF ) );
4226 MemWrite( &item->messageColorFat.size, (uint16_t)size );
4227 TracyQueueCommit( messageColorFatThread );
4228}
4229
4230void Profiler::MessageColor( const char* txt, uint32_t color, int32_t callstack_depth )
4231{

Callers

nothing calls this directly

Calls 6

has_callstackFunction · 0.85
tracy_mallocFunction · 0.85
memcpyFunction · 0.85
MemWriteFunction · 0.85
GetTimeFunction · 0.85
SendCallstackMethod · 0.80

Tested by

no test coverage detected