From 96800a2753390a13fda60fd24135d323d0fd4c51 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 24 Apr 2023 23:00:00 +0200 Subject: [PATCH] Do not merge small groups of plot points (up to three). --- server/TracyTimelineItemPlot.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/server/TracyTimelineItemPlot.cpp b/server/TracyTimelineItemPlot.cpp index 7eefbd41..d629a983 100644 --- a/server/TracyTimelineItemPlot.cpp +++ b/server/TracyTimelineItemPlot.cpp @@ -180,11 +180,14 @@ void TimelineItemPlot::Preprocess( const TimelineContext& ctx, TaskDispatch& td, auto next = std::upper_bound( it, end, int64_t( it->time.Val() + MinVisNs ), [] ( const auto& l, const auto& r ) { return l < r.time.Val(); } ); assert( next > it ); const auto rsz = uint32_t( next - it ); - if( rsz == 1 ) + if( rsz < 4 ) { - m_draw.emplace_back( 0 ); - m_draw.emplace_back( it - vec.begin() ); - ++it; + for( int i=0; i