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

Make plot color/value formatting generic utilities.

Previous implementations of these functions (in TracyView) are still used
throughout the code. They will be removed in subsequent commits.
This commit is contained in:
Bartosz Taudul
2022-09-03 16:49:25 +02:00
parent 1736fb387a
commit 55a82ea714
2 changed files with 47 additions and 0 deletions
+6
View File
@@ -4,10 +4,13 @@
#include <stdint.h>
#include "imgui.h"
#include "TracyEvent.hpp"
namespace tracy
{
class Worker;
enum class ShortenName : uint8_t
{
Never,
@@ -22,6 +25,9 @@ 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 GetPlotColor( const PlotData& plot, const Worker& worker );
const char* FormatPlotValue( double val, PlotValueFormatting format );
}
#endif