mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 12:53:51 +00:00
Add external frames checkbox to sample entry stacks window.
This commit is contained in:
parent
3b48252bb3
commit
b8a64190dc
@ -901,18 +901,19 @@ void View::DrawSampleParents()
|
|||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Checkbox( ICON_FA_STOPWATCH " Show time", &m_statSampleTime );
|
ImGui::Checkbox( ICON_FA_STOPWATCH " Show time", &m_statSampleTime );
|
||||||
if( m_sampleParents.mode == 1 )
|
|
||||||
{
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
if( m_sampleParents.mode == 0 )
|
||||||
|
{
|
||||||
|
ImGui::Checkbox( ICON_FA_SHIELD_HALVED " External frames", &m_showExternalFrames );
|
||||||
|
}
|
||||||
|
else if( m_sampleParents.mode == 1 )
|
||||||
|
{
|
||||||
ImGui::Checkbox( ICON_FA_LAYER_GROUP " Group by function name", &m_sampleParents.groupBottomUp );
|
ImGui::Checkbox( ICON_FA_LAYER_GROUP " Group by function name", &m_sampleParents.groupBottomUp );
|
||||||
}
|
}
|
||||||
else if( m_sampleParents.mode == 2 )
|
else if( m_sampleParents.mode == 2 )
|
||||||
{
|
{
|
||||||
ImGui::SameLine();
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::SameLine();
|
|
||||||
ImGui::Checkbox( ICON_FA_LAYER_GROUP " Group by function name", &m_sampleParents.groupTopDown );
|
ImGui::Checkbox( ICON_FA_LAYER_GROUP " Group by function name", &m_sampleParents.groupTopDown );
|
||||||
}
|
}
|
||||||
ImGui::PopStyleVar();
|
ImGui::PopStyleVar();
|
||||||
@ -980,6 +981,7 @@ void View::DrawSampleParents()
|
|||||||
ImGui::TableSetupColumn( "Image" );
|
ImGui::TableSetupColumn( "Image" );
|
||||||
ImGui::TableHeadersRow();
|
ImGui::TableHeadersRow();
|
||||||
|
|
||||||
|
int external = 0;
|
||||||
int fidx = 0;
|
int fidx = 0;
|
||||||
int bidx = 0;
|
int bidx = 0;
|
||||||
for( auto& entry : cs )
|
for( auto& entry : cs )
|
||||||
@ -990,10 +992,40 @@ void View::DrawSampleParents()
|
|||||||
for( uint8_t f=0; f<fsz; f++ )
|
for( uint8_t f=0; f<fsz; f++ )
|
||||||
{
|
{
|
||||||
const auto& frame = frameData->data[f];
|
const auto& frame = frameData->data[f];
|
||||||
auto txt = m_worker.GetString( frame.name );
|
auto filename = m_worker.GetString( frame.file );
|
||||||
bidx++;
|
auto image = frameData->imageName.Active() ? m_worker.GetString( frameData->imageName ) : nullptr;
|
||||||
|
|
||||||
|
if( IsFrameExternal( filename, image ) )
|
||||||
|
{
|
||||||
|
if( !m_showExternalFrames )
|
||||||
|
{
|
||||||
|
if( f == fsz-1 ) fidx++;
|
||||||
|
external++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if( external != 0 )
|
||||||
|
{
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
|
ImGui::PushFont( m_smallFont );
|
||||||
|
TextDisabledUnformatted( "external" );
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
if( external == 1 )
|
||||||
|
{
|
||||||
|
TextDisabledUnformatted( "1 frame" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ImGui::TextDisabled( "%i frames", external );
|
||||||
|
}
|
||||||
|
ImGui::PopFont();
|
||||||
|
external = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::TableNextRow();
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
bidx++;
|
||||||
if( f == fsz-1 )
|
if( f == fsz-1 )
|
||||||
{
|
{
|
||||||
ImGui::Text( "%i", fidx++ );
|
ImGui::Text( "%i", fidx++ );
|
||||||
@ -1005,6 +1037,7 @@ void View::DrawSampleParents()
|
|||||||
ImGui::PopFont();
|
ImGui::PopFont();
|
||||||
}
|
}
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
|
auto txt = m_worker.GetString( frame.name );
|
||||||
{
|
{
|
||||||
ImGui::PushTextWrapPos( 0.0f );
|
ImGui::PushTextWrapPos( 0.0f );
|
||||||
if( txt[0] == '[' )
|
if( txt[0] == '[' )
|
||||||
@ -1152,6 +1185,23 @@ void View::DrawSampleParents()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if( external != 0 )
|
||||||
|
{
|
||||||
|
ImGui::TableNextRow();
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
ImGui::PushFont( m_smallFont );
|
||||||
|
TextDisabledUnformatted( "external" );
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
if( external == 1 )
|
||||||
|
{
|
||||||
|
TextDisabledUnformatted( "1 frame" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ImGui::TextDisabled( "%i frames", external );
|
||||||
|
}
|
||||||
|
ImGui::PopFont();
|
||||||
|
}
|
||||||
ImGui::EndTable();
|
ImGui::EndTable();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user