mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-25 23:44:35 +00:00
Add non-View-dependent thread color getter.
This commit is contained in:
parent
0c4ca4cd69
commit
6e36469840
@ -140,6 +140,12 @@ void TooltipNormalizedName( const char* name, const char* normalized )
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t GetThreadColor( uint64_t thread, int depth, bool dynamic )
|
||||
{
|
||||
if( !dynamic ) return 0xFFCC5555;
|
||||
return GetHsvColor( thread, depth );
|
||||
}
|
||||
|
||||
uint32_t GetPlotColor( const PlotData& plot, const Worker& worker )
|
||||
{
|
||||
switch( plot.type )
|
||||
|
@ -25,6 +25,7 @@ void TooltipNormalizedName( const char* name, const char* normalized );
|
||||
|
||||
static inline const char* ShortenZoneName( ShortenName type, const char* name ) { ImVec2 tsz = {}; return ShortenZoneName( type, name, tsz, 0 ); }
|
||||
|
||||
uint32_t GetThreadColor( uint64_t thread, int depth, bool dynamic );
|
||||
uint32_t GetPlotColor( const PlotData& plot, const Worker& worker );
|
||||
const char* FormatPlotValue( double val, PlotValueFormatting format );
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include "TracyColor.hpp"
|
||||
#include "TracyPrint.hpp"
|
||||
#include "TracyUtility.hpp"
|
||||
#include "TracyView.hpp"
|
||||
|
||||
namespace tracy
|
||||
@ -9,8 +10,7 @@ namespace tracy
|
||||
|
||||
uint32_t View::GetThreadColor( uint64_t thread, int depth )
|
||||
{
|
||||
if( m_vd.dynamicColors == 0 ) return 0xFFCC5555;
|
||||
return GetHsvColor( thread, depth );
|
||||
return tracy::GetThreadColor( thread, depth, m_vd.dynamicColors != 0 );
|
||||
}
|
||||
|
||||
uint32_t View::GetRawSrcLocColor( const SourceLocation& srcloc, int depth )
|
||||
|
Loading…
Reference in New Issue
Block a user