1
0
mirror of https://github.com/wolfpld/tracy synced 2025-05-02 21:53:52 +00:00

Separate thread names from zones in zone view.

This commit is contained in:
Bartosz Taudul 2017-09-23 01:29:27 +02:00
parent 1116ef33c5
commit a41db80ff2

View File

@ -869,9 +869,14 @@ void View::DrawZones()
while( false ); while( false );
// zones // zones
const auto ostep = ImGui::GetFontSize();
int offset = 20; int offset = 20;
for( auto& v : m_threads ) for( auto& v : m_threads )
{ {
draw->AddLine( wpos + ImVec2( 0, offset + ostep - 1 ), wpos + ImVec2( w, offset + ostep - 1 ), 0x33FFFFFF );
draw->AddText( wpos + ImVec2( 0, offset ), 0xFFFFFFFF, GetThreadString( v.id ) );
offset += ostep;
auto& timeline = v.timeline; auto& timeline = v.timeline;
auto it = std::lower_bound( timeline.begin(), timeline.end(), m_zvStart, [] ( const auto& l, const auto& r ) { return l->end < r; } ); auto it = std::lower_bound( timeline.begin(), timeline.end(), m_zvStart, [] ( const auto& l, const auto& r ) { return l->end < r; } );
if( it != timeline.end() ) if( it != timeline.end() )
@ -910,9 +915,7 @@ void View::DrawZones()
} }
} }
draw->AddText( wpos + ImVec2( 0, offset ), 0xFFFFFFFF, GetThreadString( v.id ) ); offset += ostep * 1.2f;
offset += 20;
} }
} }