diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 9050f618..689c1e92 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -311,6 +311,7 @@ private: std::vector GetMemoryPages() const; const char* GetPlotName( const PlotData* plot ) const; + uint32_t GetPlotColor( const PlotData* plot ) const; void SmallCallstackButton( const char* name, uint32_t callstack, int& idx, bool tooltip = true ); void DrawCallstackCalls( uint32_t callstack, uint16_t limit ) const; diff --git a/server/TracyView_Plots.cpp b/server/TracyView_Plots.cpp index d18ec54c..99e944c6 100644 --- a/server/TracyView_Plots.cpp +++ b/server/TracyView_Plots.cpp @@ -1,5 +1,6 @@ #include +#include "TracyColor.hpp" #include "TracyImGui.hpp" #include "TracyMouse.hpp" #include "TracyPrint.hpp" @@ -33,12 +34,12 @@ const char* View::GetPlotName( const PlotData* plot ) const } } -static uint32_t GetPlotColor( const PlotData* plot ) +uint32_t View::GetPlotColor( const PlotData* plot ) const { switch( plot->type ) { case PlotType::User: - return 0xFF44DDDD; + return GetHsvColor( charutil::hash( m_worker.GetString( plot->name ) ), -10 ); case PlotType::Memory: return 0xFF2266CC; case PlotType::SysTime: