mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Stay in fast loop until there's something to draw.
This commit is contained in:
parent
257f9818ed
commit
d1789f1e3a
@ -2308,24 +2308,21 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
|
||||
|
||||
while( vbegin < vend )
|
||||
{
|
||||
if( state == LockState::Nothing )
|
||||
if( state == LockState::Nothing || ( m_onlyContendedLocks && state == LockState::HasLock ) )
|
||||
{
|
||||
LockState nextState;
|
||||
do
|
||||
{
|
||||
vbegin = GetNextLockEvent( vbegin, vend, state, nextState, thread );
|
||||
vbegin = GetNextLockEvent( vbegin, vend, state, state, thread );
|
||||
}
|
||||
while( nextState == LockState::Nothing && vbegin < vend );
|
||||
if( nextState == LockState::Nothing ) break;
|
||||
state = nextState;
|
||||
while( vbegin < vend && ( state == LockState::Nothing || ( m_onlyContendedLocks && state == LockState::HasLock ) ) );
|
||||
if( vbegin >= vend ) break;
|
||||
state = state;
|
||||
}
|
||||
|
||||
LockState nextState;
|
||||
auto next = GetNextLockEvent( vbegin, vend, state, nextState, thread );
|
||||
|
||||
assert( state != LockState::Nothing );
|
||||
if( !m_onlyContendedLocks || state != LockState::HasLock )
|
||||
{
|
||||
assert( state != LockState::Nothing && ( !m_onlyContendedLocks || state != LockState::HasLock ) );
|
||||
drawn = true;
|
||||
const auto t0 = (*vbegin)->time;
|
||||
const auto t1 = next == tl.end() ? GetLastTime() : (*next)->time;
|
||||
@ -2482,7 +2479,6 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
|
||||
draw->AddLine( wpos + ImVec2( px1 + rsz, offset + ty/4 ), wpos + ImVec2( px1 + rsz, offset + 3*ty/4 ), 0xAAFFFFFF );
|
||||
draw->AddLine( wpos + ImVec2( px1 - rsz, offset + ty/4 ), wpos + ImVec2( px1 - rsz, offset + 3*ty/4 ), 0xAAFFFFFF );
|
||||
}
|
||||
}
|
||||
|
||||
vbegin = next;
|
||||
state = nextState;
|
||||
|
Loading…
Reference in New Issue
Block a user