1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 12:23:53 +00:00

Normalize frame names in zone trace.

This commit is contained in:
Bartosz Taudul 2022-08-15 22:32:42 +02:00
parent fd2918eaf2
commit 04aebb090b
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -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 ) )