mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Handle highlighting lock in fast-exit code path.
This commit is contained in:
parent
1e32821097
commit
bec27f7d60
@ -2881,9 +2881,22 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
|
|||||||
auto it = lockmap.threadMap.find( tid );
|
auto it = lockmap.threadMap.find( tid );
|
||||||
if( it == lockmap.threadMap.end() ) continue;
|
if( it == lockmap.threadMap.end() ) continue;
|
||||||
|
|
||||||
|
const auto offset = _offset + ostep * cnt;
|
||||||
|
|
||||||
const auto& tl = lockmap.timeline;
|
const auto& tl = lockmap.timeline;
|
||||||
assert( !tl.empty() );
|
assert( !tl.empty() );
|
||||||
if( tl.back()->time < m_zvStart ) continue;
|
if( tl.back()->time < m_zvStart )
|
||||||
|
{
|
||||||
|
if( m_lockInfoWindow == v.first )
|
||||||
|
{
|
||||||
|
draw->AddRectFilled( wpos + ImVec2( 0, offset ), wpos + ImVec2( w, offset + ty ), 0x2288DD88 );
|
||||||
|
draw->AddRect( wpos + ImVec2( 0, offset ), wpos + ImVec2( w, offset + ty ), 0x4488DD88 );
|
||||||
|
DrawLockHeader( v.first, lockmap, m_worker.GetSourceLocation( lockmap.srcloc ), hover, draw, wpos, w, ty, offset );
|
||||||
|
cnt++;
|
||||||
|
}
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
auto GetNextLockFunc = lockmap.type == LockType::Lockable ? GetNextLockEvent : GetNextLockEventShared;
|
auto GetNextLockFunc = lockmap.type == LockType::Lockable ? GetNextLockEvent : GetNextLockEventShared;
|
||||||
|
|
||||||
@ -2895,8 +2908,6 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
|
|||||||
|
|
||||||
if( vbegin > tl.begin() ) vbegin--;
|
if( vbegin > tl.begin() ) vbegin--;
|
||||||
|
|
||||||
const auto offset = _offset + ostep * cnt;
|
|
||||||
|
|
||||||
if( m_lockInfoWindow == v.first )
|
if( m_lockInfoWindow == v.first )
|
||||||
{
|
{
|
||||||
draw->AddRectFilled( wpos + ImVec2( 0, offset ), wpos + ImVec2( w, offset + ty ), 0x2288DD88 );
|
draw->AddRectFilled( wpos + ImVec2( 0, offset ), wpos + ImVec2( w, offset + ty ), 0x2288DD88 );
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user