From 83ae9868e2ee939c42ea187e586c5f6c0db9412b Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 22 Mar 2023 22:41:19 +0100 Subject: [PATCH] Fix pixel and nanosecond domain mixing. --- server/TracyTimelineItemThread.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/TracyTimelineItemThread.cpp b/server/TracyTimelineItemThread.cpp index 55897d34..2c071409 100644 --- a/server/TracyTimelineItemThread.cpp +++ b/server/TracyTimelineItemThread.cpp @@ -565,7 +565,8 @@ void TimelineItemThread::PreprocessSamples( const TimelineContext& ctx, const Ve while( it < itend ) { bool visible = true; - const auto px0 = ( it->time.Val() - vStart ) * pxns; + const auto t0 = it->time.Val(); + const auto px0 = ( t0 - vStart ) * pxns; double px1; auto next = it+1; uint32_t num = 0; @@ -577,7 +578,7 @@ void TimelineItemThread::PreprocessSamples( const TimelineContext& ctx, const Ve { const auto MinVisNs = MinVis * nspx; visible = false; - auto nextTime = px0 + MinVisNs; + auto nextTime = t0 + MinVisNs; for(;;) { const auto prev = next;