mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-25 23:44:35 +00:00
Timeline construction sketches.
This commit is contained in:
parent
c0dd0ef5bc
commit
0220907a14
@ -4,6 +4,7 @@
|
|||||||
# include <sys/time.h>
|
# include <sys/time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include "../common/tracy_lz4.hpp"
|
#include "../common/tracy_lz4.hpp"
|
||||||
@ -216,10 +217,29 @@ void View::AddString( uint64_t ptr, std::string&& str )
|
|||||||
|
|
||||||
void View::NewZone( uint64_t idx )
|
void View::NewZone( uint64_t idx )
|
||||||
{
|
{
|
||||||
|
if( !m_timeline.empty() )
|
||||||
|
{
|
||||||
|
auto& zone = m_data[idx];
|
||||||
|
const auto lastend = m_data[m_timeline.back()].end;
|
||||||
|
if( lastend != -1 && lastend < zone.start )
|
||||||
|
{
|
||||||
|
m_timeline.emplace_back( idx );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_timeline.emplace_back( idx );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::UpdateZone( uint64_t idx )
|
void View::UpdateZone( uint64_t idx )
|
||||||
{
|
{
|
||||||
|
auto& zone = m_data[idx++];
|
||||||
|
assert( zone.end != -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user