Timeline construction sketches.

This commit is contained in:
Bartosz Taudul 2017-09-14 21:28:40 +02:00
parent c0dd0ef5bc
commit 0220907a14

View File

@ -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 );
} }
} }