mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Insert lock events into timeline.
This commit is contained in:
parent
9904ebb4b6
commit
39bb9a3ad1
@ -676,8 +676,17 @@ void View::InsertZone( Event* zone, Event* parent, Vector<Event*>& vec )
|
||||
}
|
||||
}
|
||||
|
||||
void View::InsertLockEvent( Vector<LockEvent*>& timeline, const LockEvent* lev )
|
||||
void View::InsertLockEvent( Vector<LockEvent*>& timeline, LockEvent* lev )
|
||||
{
|
||||
if( timeline.empty() || timeline.back()->time < lev->time )
|
||||
{
|
||||
timeline.push_back( lev );
|
||||
}
|
||||
else
|
||||
{
|
||||
auto it = std::lower_bound( timeline.begin(), timeline.end(), lev->time, [] ( const auto& lhs, const auto& rhs ) { return lhs->time < rhs; } );
|
||||
timeline.insert( it, lev );
|
||||
}
|
||||
}
|
||||
|
||||
uint64_t View::GetFrameTime( size_t idx ) const
|
||||
|
@ -84,7 +84,7 @@ private:
|
||||
|
||||
void InsertZone( Event* zone, Event* parent, Vector<Event*>& vec );
|
||||
|
||||
void InsertLockEvent( Vector<LockEvent*>& timeline, const LockEvent* lev );
|
||||
void InsertLockEvent( Vector<LockEvent*>& timeline, LockEvent* lev );
|
||||
|
||||
uint64_t GetFrameTime( size_t idx ) const;
|
||||
uint64_t GetFrameBegin( size_t idx ) const;
|
||||
|
Loading…
Reference in New Issue
Block a user