mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Normalize frame names in parents frame tree.
This commit is contained in:
parent
389cf135c0
commit
27165d12a6
@ -710,10 +710,16 @@ void View::DrawParentsFrameTreeLevel( const unordered_flat_map<uint64_t, Callsta
|
|||||||
{
|
{
|
||||||
TextColoredUnformatted( 0xFF8888FF, frameName );
|
TextColoredUnformatted( 0xFF8888FF, frameName );
|
||||||
}
|
}
|
||||||
else
|
else if( m_shortenName == ShortenName::Never )
|
||||||
{
|
{
|
||||||
ImGui::TextUnformatted( frameName );
|
ImGui::TextUnformatted( frameName );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const auto normalized = ShortenZoneName( ShortenName::OnlyNormalize, frameName );
|
||||||
|
ImGui::TextUnformatted( normalized );
|
||||||
|
TooltipNormalizedName( frameName, normalized );
|
||||||
|
}
|
||||||
ImGui::Unindent( ImGui::GetTreeNodeToLabelSpacing() );
|
ImGui::Unindent( ImGui::GetTreeNodeToLabelSpacing() );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -723,11 +729,29 @@ void View::DrawParentsFrameTreeLevel( const unordered_flat_map<uint64_t, Callsta
|
|||||||
else if( isKernel ) ImGui::PushStyleColor( ImGuiCol_Text, 0xFF8888FF );
|
else if( isKernel ) ImGui::PushStyleColor( ImGuiCol_Text, 0xFF8888FF );
|
||||||
if( tree.size() == 1 )
|
if( tree.size() == 1 )
|
||||||
{
|
{
|
||||||
expand = ImGui::TreeNodeEx( frameName, ImGuiTreeNodeFlags_DefaultOpen );
|
if( m_shortenName == ShortenName::Never )
|
||||||
|
{
|
||||||
|
expand = ImGui::TreeNodeEx( frameName, ImGuiTreeNodeFlags_DefaultOpen );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const auto normalized = ShortenZoneName( ShortenName::OnlyNormalize, frameName );
|
||||||
|
expand = ImGui::TreeNodeEx( normalized, ImGuiTreeNodeFlags_DefaultOpen );
|
||||||
|
TooltipNormalizedName( frameName, normalized );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
expand = ImGui::TreeNode( frameName );
|
if( m_shortenName == ShortenName::Never )
|
||||||
|
{
|
||||||
|
expand = ImGui::TreeNode( frameName );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const auto normalized = ShortenZoneName( ShortenName::OnlyNormalize, frameName );
|
||||||
|
expand = ImGui::TreeNode( normalized );
|
||||||
|
TooltipNormalizedName( frameName, normalized );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if( isKernel || frameName[0] == '[' ) ImGui::PopStyleColor();
|
if( isKernel || frameName[0] == '[' ) ImGui::PopStyleColor();
|
||||||
ImGui::PopID();
|
ImGui::PopID();
|
||||||
|
Loading…
Reference in New Issue
Block a user