mirror of
https://github.com/wolfpld/tracy.git
synced 2024-09-20 13:52:18 +00:00
Only calculate zone child data if child list is displayed.
This commit is contained in:
parent
754e79b443
commit
fd59ac0125
@ -2718,6 +2718,13 @@ void View::DrawZoneInfoWindow()
|
||||
}
|
||||
}
|
||||
|
||||
if( !ev.child.empty() )
|
||||
{
|
||||
bool expand = ImGui::TreeNode( "Child zones" );
|
||||
ImGui::SameLine();
|
||||
ImGui::TextDisabled( "(%s)", RealToString( ev.child.size(), true ) );
|
||||
if( expand )
|
||||
{
|
||||
auto ctt = std::make_unique<uint64_t[]>( ev.child.size() );
|
||||
auto cti = std::make_unique<uint32_t[]>( ev.child.size() );
|
||||
uint64_t ctime = 0;
|
||||
@ -2732,13 +2739,6 @@ void View::DrawZoneInfoWindow()
|
||||
|
||||
pdqsort_branchless( cti.get(), cti.get() + ev.child.size(), [&ctt] ( const auto& lhs, const auto& rhs ) { return ctt[lhs] > ctt[rhs]; } );
|
||||
|
||||
if( !ev.child.empty() )
|
||||
{
|
||||
bool expand = ImGui::TreeNode( "Child zones" );
|
||||
ImGui::SameLine();
|
||||
ImGui::TextDisabled( "(%s)", RealToString( ev.child.size(), true ) );
|
||||
if( expand )
|
||||
{
|
||||
const auto ty = ImGui::GetTextLineHeight();
|
||||
ImGui::Columns( 2 );
|
||||
ImGui::TextColored( ImVec4( 1.0f, 1.0f, 0.4f, 1.0f ), "Self time" );
|
||||
@ -2877,6 +2877,13 @@ void View::DrawGpuInfoWindow()
|
||||
}
|
||||
}
|
||||
|
||||
if( !ev.child.empty() )
|
||||
{
|
||||
bool expand = ImGui::TreeNode( "Child zones" );
|
||||
ImGui::SameLine();
|
||||
ImGui::TextDisabled( "(%s)", RealToString( ev.child.size(), true ) );
|
||||
if( expand )
|
||||
{
|
||||
auto ctt = std::make_unique<uint64_t[]>( ev.child.size() );
|
||||
auto cti = std::make_unique<uint32_t[]>( ev.child.size() );
|
||||
uint64_t ctime = 0;
|
||||
@ -2891,13 +2898,6 @@ void View::DrawGpuInfoWindow()
|
||||
|
||||
pdqsort_branchless( cti.get(), cti.get() + ev.child.size(), [&ctt] ( const auto& lhs, const auto& rhs ) { return ctt[lhs] > ctt[rhs]; } );
|
||||
|
||||
if( !ev.child.empty() )
|
||||
{
|
||||
bool expand = ImGui::TreeNode( "Child zones" );
|
||||
ImGui::SameLine();
|
||||
ImGui::TextDisabled( "(%s)", RealToString( ev.child.size(), true ) );
|
||||
if( expand )
|
||||
{
|
||||
const auto ty = ImGui::GetTextLineHeight();
|
||||
ImGui::Columns( 2 );
|
||||
ImGui::TextColored( ImVec4( 1.0f, 1.0f, 0.4f, 1.0f ), "Self time" );
|
||||
|
Loading…
Reference in New Issue
Block a user