1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Adding ZoneColor to set a dynamic color override to an existing zone.

This commit is contained in:
Ben Vanik
2020-11-27 03:37:35 -08:00
committed by Bartosz Taudul
parent dfdf70aea3
commit 7dfdad2e02
12 changed files with 106 additions and 7 deletions
+13
View File
@@ -136,6 +136,19 @@ public:
TracyLfqCommit;
}
tracy_force_inline void Color( uint32_t color )
{
if( !m_active ) return;
#ifdef TRACY_ON_DEMAND
if( GetProfiler().ConnectionId() != m_connectionId ) return;
#endif
TracyLfqPrepare( QueueType::ZoneColor );
MemWrite( &item->zoneColor.r, uint8_t( ( color ) & 0xFF ) );
MemWrite( &item->zoneColor.g, uint8_t( ( color >> 8 ) & 0xFF ) );
MemWrite( &item->zoneColor.b, uint8_t( ( color >> 16 ) & 0xFF ) );
TracyLfqCommit;
}
tracy_force_inline void Value( uint64_t value )
{
if( !m_active ) return;