Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf@nereid.pl>2022-08-15 23:32:42 +0300
committerBartosz Taudul <wolf@nereid.pl>2022-08-15 23:32:42 +0300
commit04aebb090b3ef3d7201bffbfab12acefb8858b30 (patch)
treed9904e5d81153376fc20710039bd106730f8fcaf /server/TracyView_ZoneInfo.cpp
parentfd2918eaf2e53e709fd35aa10a4ea67d07b50694 (diff)
Normalize frame names in zone trace.
Diffstat (limited to 'server/TracyView_ZoneInfo.cpp')
-rw-r--r--server/TracyView_ZoneInfo.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/server/TracyView_ZoneInfo.cpp b/server/TracyView_ZoneInfo.cpp
index ec3e32a7..c039ec16 100644
--- a/server/TracyView_ZoneInfo.cpp
+++ b/server/TracyView_ZoneInfo.cpp
@@ -132,6 +132,8 @@ void DrawZoneTrace( T zone, const std::vector<T>& trace, const Worker& worker, B
ImGui::TextDisabled( "(%s)", RealToString( trace.size() ) );
if( !expand ) return;
+ const auto shortenName = view.GetShortenName();
+
ImGui::SameLine();
SmallCheckbox( "Show unknown frames", &showUnknownFrames );
@@ -186,7 +188,10 @@ void DrawZoneTrace( T zone, const std::vector<T>& trace, const Worker& worker, B
auto frame = frameData->data + frameData->size - 1;
ImGui::TextDisabled( "%i.", fidx++ );
ImGui::SameLine();
- TextDisabledUnformatted( worker.GetString( frame->name ) );
+ const auto frameName = worker.GetString( frame->name );
+ const auto normalized = shortenName != ShortenName::Never ? ShortenZoneName( ShortenName::OnlyNormalize, frameName ) : frameName;
+ TextDisabledUnformatted( normalized );
+ TooltipNormalizedName( frameName, normalized );
ImGui::SameLine();
ImGui::Spacing();
if( anim.Match( frame ) )
@@ -237,7 +242,10 @@ void DrawZoneTrace( T zone, const std::vector<T>& trace, const Worker& worker, B
auto frame = frameData->data + frameData->size - 1;
ImGui::TextDisabled( "%i.", fidx++ );
ImGui::SameLine();
- TextDisabledUnformatted( worker.GetString( frame->name ) );
+ const auto frameName = worker.GetString( frame->name );
+ const auto normalized = shortenName != ShortenName::Never ? ShortenZoneName( ShortenName::OnlyNormalize, frameName ) : frameName;
+ TextDisabledUnformatted( normalized );
+ TooltipNormalizedName( frameName, normalized );
ImGui::SameLine();
ImGui::Spacing();
if( anim.Match( frame ) )