2019-08-28 17:35:54 +00:00
|
|
|
#ifndef __TRACYVIEWDATA_HPP__
|
|
|
|
#define __TRACYVIEWDATA_HPP__
|
|
|
|
|
|
|
|
#include <stdint.h>
|
2020-04-18 12:25:04 +00:00
|
|
|
#include <regex>
|
2019-08-28 17:35:54 +00:00
|
|
|
|
|
|
|
namespace tracy
|
|
|
|
{
|
|
|
|
|
2020-08-04 15:09:17 +00:00
|
|
|
struct Range
|
|
|
|
{
|
|
|
|
void StartFrame() { hiMin = hiMax = false; }
|
|
|
|
|
|
|
|
int64_t min = 0;
|
|
|
|
int64_t max = 0;
|
|
|
|
bool active = false;
|
|
|
|
bool hiMin = false;
|
|
|
|
bool hiMax = false;
|
|
|
|
bool modMin = false;
|
|
|
|
bool modMax = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct RangeSlim
|
|
|
|
{
|
|
|
|
bool operator==( const Range& other ) const { return other.active == active && other.min == min && other.max == max; }
|
|
|
|
bool operator!=( const Range& other ) const { return !(*this == other); }
|
|
|
|
void operator=( const Range& other ) { active = other.active; min = other.min; max = other.max; }
|
|
|
|
|
|
|
|
int64_t min, max;
|
|
|
|
bool active = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2019-08-28 17:35:54 +00:00
|
|
|
struct ViewData
|
|
|
|
{
|
|
|
|
int64_t zvStart = 0;
|
|
|
|
int64_t zvEnd = 0;
|
2019-08-28 17:49:27 +00:00
|
|
|
int32_t zvHeight = 0;
|
|
|
|
int32_t zvScroll = 0;
|
2019-08-28 17:52:36 +00:00
|
|
|
int32_t frameScale = 0;
|
|
|
|
int32_t frameStart = 0;
|
2019-08-28 19:35:08 +00:00
|
|
|
|
|
|
|
uint8_t drawGpuZones = true;
|
|
|
|
uint8_t drawZones = true;
|
|
|
|
uint8_t drawLocks = true;
|
|
|
|
uint8_t drawPlots = true;
|
|
|
|
uint8_t onlyContendedLocks = true;
|
|
|
|
uint8_t drawEmptyLabels = false;
|
|
|
|
uint8_t drawContextSwitches = true;
|
2019-09-30 21:37:36 +00:00
|
|
|
uint8_t darkenContextSwitches = true;
|
2019-08-28 19:35:08 +00:00
|
|
|
uint8_t drawCpuData = true;
|
2019-10-15 19:37:16 +00:00
|
|
|
uint8_t drawCpuUsageGraph = true;
|
2020-02-22 16:35:29 +00:00
|
|
|
uint8_t drawSamples = true;
|
2019-11-01 01:07:55 +00:00
|
|
|
uint8_t dynamicColors = 1;
|
2020-09-21 00:04:13 +00:00
|
|
|
uint8_t forceColors = false;
|
2020-03-16 19:58:18 +00:00
|
|
|
uint8_t ghostZones = true;
|
2019-08-28 17:35:54 +00:00
|
|
|
};
|
|
|
|
|
2019-10-13 14:28:40 +00:00
|
|
|
struct Annotation
|
|
|
|
{
|
|
|
|
std::string text;
|
2020-08-04 15:14:58 +00:00
|
|
|
Range range;
|
2019-10-13 14:28:40 +00:00
|
|
|
uint32_t color;
|
|
|
|
};
|
|
|
|
|
2020-04-18 12:25:04 +00:00
|
|
|
struct SourceRegex
|
|
|
|
{
|
|
|
|
std::string pattern;
|
|
|
|
std::string target;
|
|
|
|
std::regex regex;
|
|
|
|
};
|
|
|
|
|
2019-08-28 17:35:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|