2022-08-15 14:34:37 +00:00
|
|
|
#ifndef __TRACYUTILITY_HPP__
|
|
|
|
#define __TRACYUTILITY_HPP__
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
#include "imgui.h"
|
2022-09-03 14:49:25 +00:00
|
|
|
#include "TracyEvent.hpp"
|
2022-08-15 14:34:37 +00:00
|
|
|
|
|
|
|
namespace tracy
|
|
|
|
{
|
|
|
|
|
2022-09-03 14:49:25 +00:00
|
|
|
class Worker;
|
|
|
|
|
2022-08-15 14:34:37 +00:00
|
|
|
enum class ShortenName : uint8_t
|
|
|
|
{
|
|
|
|
Never,
|
|
|
|
Always,
|
|
|
|
OnlyNormalize,
|
|
|
|
NoSpace,
|
|
|
|
NoSpaceAndNormalize,
|
|
|
|
};
|
|
|
|
|
|
|
|
const char* ShortenZoneName( ShortenName type, const char* name, ImVec2& tsz, float zsz );
|
2022-08-15 17:43:03 +00:00
|
|
|
void TooltipNormalizedName( const char* name, const char* normalized );
|
2022-08-15 14:34:37 +00:00
|
|
|
|
2022-08-15 14:39:25 +00:00
|
|
|
static inline const char* ShortenZoneName( ShortenName type, const char* name ) { ImVec2 tsz = {}; return ShortenZoneName( type, name, tsz, 0 ); }
|
|
|
|
|
2022-09-03 14:49:25 +00:00
|
|
|
uint32_t GetPlotColor( const PlotData& plot, const Worker& worker );
|
|
|
|
const char* FormatPlotValue( double val, PlotValueFormatting format );
|
|
|
|
|
2022-08-15 14:34:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|