| 4204 | } |
| 4205 | |
| 4206 | void 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 | |
| 4230 | void Profiler::MessageColor( const char* txt, uint32_t color, int32_t callstack_depth ) |
| 4231 | { |
nothing calls this directly
no test coverage detected