From 798249c81c067a4e152dc98a872666a6825440b2 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 26 Apr 2023 00:43:51 +0200 Subject: [PATCH] Remove error indicators for CPU zones. --- server/TracyTimelineItemThread.cpp | 6 ++--- server/TracyView_ZoneTimeline.cpp | 43 ------------------------------ 2 files changed, 2 insertions(+), 47 deletions(-) diff --git a/server/TracyTimelineItemThread.cpp b/server/TracyTimelineItemThread.cpp index 8f89f414..63510e15 100644 --- a/server/TracyTimelineItemThread.cpp +++ b/server/TracyTimelineItemThread.cpp @@ -414,8 +414,6 @@ int TimelineItemThread::PreprocessZoneLevel( const TimelineContext& ctx, const V template int TimelineItemThread::PreprocessZoneLevel( const TimelineContext& ctx, const V& vec, int depth, bool visible ) { - const auto delay = m_worker.GetDelay(); - const auto resolution = m_worker.GetResolution(); const auto vStart = ctx.vStart; const auto vEnd = ctx.vEnd; const auto nspx = ctx.nspx; @@ -423,10 +421,10 @@ int TimelineItemThread::PreprocessZoneLevel( const TimelineContext& ctx, const V const auto MinVisNs = int64_t( round( GetScale() * MinVisSize * nspx ) ); // cast to uint64_t, so that unended zones (end = -1) are still drawn - auto it = std::lower_bound( vec.begin(), vec.end(), std::max( 0, vStart - std::max( delay, 2 * MinVisNs ) ), [] ( const auto& l, const auto& r ) { Adapter a; return (uint64_t)a(l).End() < (uint64_t)r; } ); + auto it = std::lower_bound( vec.begin(), vec.end(), vStart, [] ( const auto& l, const auto& r ) { Adapter a; return (uint64_t)a(l).End() < (uint64_t)r; } ); if( it == vec.end() ) return depth; - const auto zitend = std::lower_bound( it, vec.end(), vEnd + resolution, [] ( const auto& l, const auto& r ) { Adapter a; return a(l).Start() < r; } ); + const auto zitend = std::lower_bound( it, vec.end(), vEnd, [] ( const auto& l, const auto& r ) { Adapter a; return a(l).Start() < r; } ); if( it == zitend ) return depth; Adapter a; if( !a(*it).IsEndValid() && m_worker.GetZoneEnd( a(*it) ) < vStart ) return depth; diff --git a/server/TracyView_ZoneTimeline.cpp b/server/TracyView_ZoneTimeline.cpp index 097fc8e2..5c975bbb 100644 --- a/server/TracyView_ZoneTimeline.cpp +++ b/server/TracyView_ZoneTimeline.cpp @@ -211,12 +211,6 @@ void View::DrawZoneList( const TimelineContext& ctx, const std::vector MinVisSize ) - { - const auto diff = dsz - MinVisSize; - uint32_t color; - if( diff < 1 ) - { - color = ( uint32_t( diff * 0x88 ) << 24 ) | 0x2222DD; - } - else - { - color = 0x882222DD; - } - - draw->AddRectFilled( wpos + ImVec2( pr0, offset ), wpos + ImVec2( std::min( pr0+dsz, pr1 ), offset + tsz.y ), color ); - draw->AddRectFilled( wpos + ImVec2( pr1, offset ), wpos + ImVec2( pr1+dsz, offset + tsz.y ), color ); - } - if( rsz > MinVisSize ) - { - const auto diff = rsz - MinVisSize; - uint32_t color; - if( diff < 1 ) - { - color = ( uint32_t( diff * 0xAA ) << 24 ) | 0xFFFFFF; - } - else - { - color = 0xAAFFFFFF; - } - - DrawLine( draw, dpos + ImVec2( pr0 + rsz, offset + ty05 ), dpos + ImVec2( pr0 - rsz, offset + ty05 ), color ); - DrawLine( draw, dpos + ImVec2( pr0 + rsz, offset + ty025 ), dpos + ImVec2( pr0 + rsz, offset + ty075 ), color ); - DrawLine( draw, dpos + ImVec2( pr0 - rsz, offset + ty025 ), dpos + ImVec2( pr0 - rsz, offset + ty075 ), color ); - - DrawLine( draw, dpos + ImVec2( pr1 + rsz, offset + ty05 ), dpos + ImVec2( pr1 - rsz, offset + ty05 ), color ); - DrawLine( draw, dpos + ImVec2( pr1 + rsz, offset + ty025 ), dpos + ImVec2( pr1 + rsz, offset + ty075 ), color ); - DrawLine( draw, dpos + ImVec2( pr1 - rsz, offset + ty025 ), dpos + ImVec2( pr1 - rsz, offset + ty075 ), color ); - } if( tsz.x < zsz ) { const auto x = ( ev.Start() - m_vd.zvStart ) * pxns + ( ( end - ev.Start() ) * pxns - tsz.x ) / 2;