diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 743f6f87..8c4adcdf 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -11849,13 +11849,8 @@ uint32_t View::GetZoneColor( const ZoneEvent& ev, uint64_t thread, int depth ) } } -uint32_t View::GetRawZoneColor( const ZoneEvent& ev, uint64_t thread, int depth ) +uint32_t View::GetThreadColor( uint64_t thread, int depth ) { - const auto& srcloc = m_worker.GetSourceLocation( ev.SrcLoc() ); - const auto color = srcloc.color; - if( color != 0 ) return color | 0xFF000000; - if( !m_vd.dynamicColors ) return 0xFFCC5555; - const uint8_t h = thread & 0xFF; const uint8_t s = 96; const uint8_t v = std::max( 96, 170 - depth * 8 ); @@ -11882,6 +11877,15 @@ uint32_t View::GetRawZoneColor( const ZoneEvent& ev, uint64_t thread, int depth return 0xFF000000 | ( r << 16 ) | ( g << 8 ) | b; } +uint32_t View::GetRawZoneColor( const ZoneEvent& ev, uint64_t thread, int depth ) +{ + const auto& srcloc = m_worker.GetSourceLocation( ev.SrcLoc() ); + const auto color = srcloc.color; + if( color != 0 ) return color | 0xFF000000; + if( !m_vd.dynamicColors ) return 0xFFCC5555; + return GetThreadColor( thread, depth ); +} + uint32_t View::GetZoneColor( const GpuEvent& ev ) { const auto& srcloc = m_worker.GetSourceLocation( ev.srcloc ); diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 60d121a3..c2a2d3d7 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -154,6 +154,7 @@ private: void HandleZoneViewMouse( int64_t timespan, const ImVec2& wpos, float w, double& pxns ); + uint32_t GetThreadColor( uint64_t thread, int depth ); uint32_t GetZoneColor( const ZoneEvent& ev, uint64_t thread, int depth ); uint32_t GetZoneColor( const GpuEvent& ev ); uint32_t GetRawZoneColor( const ZoneEvent& ev, uint64_t thread, int depth );