mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
No need for nextState variable.
This commit is contained in:
parent
981bbfe42d
commit
b67989ab54
@ -2913,8 +2913,7 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
|
|||||||
drawn = true;
|
drawn = true;
|
||||||
|
|
||||||
LockState drawState = state;
|
LockState drawState = state;
|
||||||
LockState nextState;
|
auto next = GetNextLockEvent( vbegin, vend, state, state, threadBit );
|
||||||
auto next = GetNextLockEvent( vbegin, vend, state, nextState, threadBit );
|
|
||||||
|
|
||||||
const auto t0 = (*vbegin)->time;
|
const auto t0 = (*vbegin)->time;
|
||||||
int64_t t1 = next == tl.end() ? GetLastTime() : (*next)->time;
|
int64_t t1 = next == tl.end() ? GetLastTime() : (*next)->time;
|
||||||
@ -2927,7 +2926,7 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
|
|||||||
{
|
{
|
||||||
if( next >= vend || px1 - tx0 > MinVisSize ) break;
|
if( next >= vend || px1 - tx0 > MinVisSize ) break;
|
||||||
auto n = next;
|
auto n = next;
|
||||||
auto ns = nextState;
|
auto ns = state;
|
||||||
while( n < vend && ( ns == LockState::Nothing || ( m_onlyContendedLocks && ns == LockState::HasLock ) ) )
|
while( n < vend && ( ns == LockState::Nothing || ( m_onlyContendedLocks && ns == LockState::HasLock ) ) )
|
||||||
{
|
{
|
||||||
n = GetNextLockEvent( n, vend, ns, ns, threadBit );
|
n = GetNextLockEvent( n, vend, ns, ns, threadBit );
|
||||||
@ -2937,7 +2936,7 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
|
|||||||
{
|
{
|
||||||
n = GetNextLockEvent( n, vend, ns, ns, threadBit );
|
n = GetNextLockEvent( n, vend, ns, ns, threadBit );
|
||||||
}
|
}
|
||||||
drawState = CombineLockState( drawState, nextState );
|
drawState = CombineLockState( drawState, state );
|
||||||
condensed++;
|
condensed++;
|
||||||
const auto t2 = n == tl.end() ? GetLastTime() : (*n)->time;
|
const auto t2 = n == tl.end() ? GetLastTime() : (*n)->time;
|
||||||
const auto px2 = ( t2 - m_zvStart ) * pxns;
|
const auto px2 = ( t2 - m_zvStart ) * pxns;
|
||||||
@ -2947,7 +2946,7 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
|
|||||||
tx0 = px1;
|
tx0 = px1;
|
||||||
px1 = px2;
|
px1 = px2;
|
||||||
next = n;
|
next = n;
|
||||||
nextState = ns;
|
state = ns;
|
||||||
}
|
}
|
||||||
|
|
||||||
pxend = std::max( { px1, px0+MinVisSize, px0 + pxns * 0.5 } );
|
pxend = std::max( { px1, px0+MinVisSize, px0 + pxns * 0.5 } );
|
||||||
@ -3119,7 +3118,6 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
|
|||||||
}
|
}
|
||||||
|
|
||||||
vbegin = next;
|
vbegin = next;
|
||||||
state = nextState;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( drawn )
|
if( drawn )
|
||||||
|
Loading…
Reference in New Issue
Block a user