mirror of
https://github.com/wolfpld/tracy.git
synced 2026-06-08 00:23:47 +00:00
Dim external frames in local call stacks.
This commit is contained in:
@@ -2624,9 +2624,13 @@ uint64_t SourceView::RenderSymbolAsmView( const AddrStatData& as, Worker& worker
|
||||
const auto normalized = view.GetShortenName() != ShortenName::Never ? ShortenZoneName( ShortenName::OnlyNormalize, symName ) : symName;
|
||||
const auto fn = worker.GetString( lcs->data[i].file );
|
||||
const auto srcline = lcs->data[i].line;
|
||||
const auto external = worker.IsFrameExternal( lcs->data[i].file, lcs->imageName );
|
||||
if( srcline != 0 )
|
||||
{
|
||||
if( ImGui::BeginMenu( normalized ) )
|
||||
if( external ) ImGui::PushStyleColor( ImGuiCol_Text, ImGui::GetStyle().Colors[ImGuiCol_TextDisabled] );
|
||||
const auto extend = ImGui::BeginMenu( normalized );
|
||||
if( external ) ImGui::PopStyleColor();
|
||||
if( extend )
|
||||
{
|
||||
if( SourceFileValid( fn, worker.GetCaptureTime(), view, worker ) )
|
||||
{
|
||||
@@ -2666,7 +2670,14 @@ uint64_t SourceView::RenderSymbolAsmView( const AddrStatData& as, Worker& worker
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui::TextDisabled( "%s", normalized );
|
||||
if( external )
|
||||
{
|
||||
TextDisabledUnformatted( normalized );
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui::TextUnformatted( normalized );
|
||||
}
|
||||
}
|
||||
ImGui::PopID();
|
||||
}
|
||||
|
||||
@@ -223,7 +223,14 @@ void PrintLocalStack( const CallstackFrameData* frame, const Worker& worker, con
|
||||
ImGui::SameLine();
|
||||
const auto symName = worker.GetString( frame->data[i].name );
|
||||
const auto normalized = view.GetShortenName() != ShortenName::Never ? ShortenZoneName( ShortenName::OnlyNormalize, symName ) : symName;
|
||||
ImGui::Text( "%s", normalized );
|
||||
if( worker.IsFrameExternal( frame->data[i].file, frame->imageName ) )
|
||||
{
|
||||
TextDisabledUnformatted( normalized );
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui::TextUnformatted( normalized );
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::PushFont( g_fonts.normal, FontSmall );
|
||||
ImGui::AlignTextToFramePadding();
|
||||
|
||||
Reference in New Issue
Block a user