Add thread color boxes to lock info.

This commit is contained in:
Bartosz Taudul 2019-09-24 23:52:52 +02:00
parent 12e2bcb691
commit 581fd920a1

View File

@ -3683,6 +3683,8 @@ void View::DrawLockHeader( uint32_t id, const LockMap& lockmap, const SourceLoca
ImGui::Indent( ty ); ImGui::Indent( ty );
for( const auto& t : lockmap.threadList ) for( const auto& t : lockmap.threadList )
{ {
SmallColorBox( GetThreadColor( t, 0 ) );
ImGui::SameLine();
ImGui::TextUnformatted( m_worker.GetThreadName( t ) ); ImGui::TextUnformatted( m_worker.GetThreadName( t ) );
} }
ImGui::Unindent( ty ); ImGui::Unindent( ty );
@ -10912,6 +10914,8 @@ void View::DrawLockInfoWindow()
{ {
for( const auto& t : lock.threadList ) for( const auto& t : lock.threadList )
{ {
SmallColorBox( GetThreadColor( t, 0 ) );
ImGui::SameLine();
ImGui::TextUnformatted( m_worker.GetThreadName( t ) ); ImGui::TextUnformatted( m_worker.GetThreadName( t ) );
ImGui::SameLine(); ImGui::SameLine();
ImGui::TextDisabled( "(%s)", RealToString( t, true ) ); ImGui::TextDisabled( "(%s)", RealToString( t, true ) );