From 0220907a14cd567f763493ebe850cd987bc24433 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 14 Sep 2017 21:28:40 +0200 Subject: [PATCH] Timeline construction sketches. --- server/TracyView.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 1ee9616d..97a7b108 100755 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -4,6 +4,7 @@ # include #endif +#include #include #include "../common/tracy_lz4.hpp" @@ -216,10 +217,29 @@ void View::AddString( uint64_t ptr, std::string&& str ) 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 ) { + auto& zone = m_data[idx++]; + assert( zone.end != -1 ); } }