1
0
mirror of https://github.com/wolfpld/tracy synced 2025-05-03 14:03:52 +00:00

Clip wait regions display.

This commit is contained in:
Bartosz Taudul 2020-02-10 00:12:34 +01:00
parent 4fc675814a
commit ffdd5290bf

View File

@ -6037,16 +6037,19 @@ void View::DrawZoneInfoWindow()
ImGui::Text( "State" );
ImGui::NextColumn();
ImGui::Separator();
while( bit < eit )
const auto wrsz = eit - bit;
ImGuiListClipper clipper( wrsz );
while( clipper.Step() )
{
const auto cend = bit->End();
const auto state = bit->State();
const auto reason = bit->Reason();
const auto cpu0 = bit->Cpu();
++bit;
const auto cstart = bit->Start();
const auto cwakeup = bit->WakeupVal();
const auto cpu1 = bit->Cpu();
for( auto i=clipper.DisplayStart; i<clipper.DisplayEnd; i++ )
{
const auto cend = bit[i].End();
const auto state = bit[i].State();
const auto reason = bit[i].Reason();
const auto cpu0 = bit[i].Cpu();
const auto cstart = bit[i+1].Start();
const auto cwakeup = bit[i+1].WakeupVal();
const auto cpu1 = bit[i+1].Cpu();
auto tt = adjust == 0 ? TimeToStringExact( cend ) : TimeToString( cend - adjust );
if( ImGui::Selectable( tt ) )
@ -6124,6 +6127,7 @@ void View::DrawZoneInfoWindow()
}
ImGui::NextColumn();
}
}
ImGui::EndColumns();
ImGui::TreePop();