From a3102ef26b16ab3dfdcc98f340b3c5a0e3b67a0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Gr=C3=A9goire?= Date: Sun, 13 Apr 2025 19:56:23 +0200 Subject: [PATCH] Fix wakeup line DPI handling and offset --- profiler/src/profiler/TracyView_CpuData.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/profiler/src/profiler/TracyView_CpuData.cpp b/profiler/src/profiler/TracyView_CpuData.cpp index c6628e26..eecbdfe5 100644 --- a/profiler/src/profiler/TracyView_CpuData.cpp +++ b/profiler/src/profiler/TracyView_CpuData.cpp @@ -499,6 +499,7 @@ void View::DrawThreadMigrations( const TimelineContext& ctx, const int origOffse const auto bgSize = GetScale() * 4.f; const auto lnSize = GetScale() * 2.f; + const auto wakeupLineSize = GetScale() * 1.5f; auto computeScreenPos = [&]( int64_t t, uint8_t cpu ) { @@ -514,14 +515,14 @@ void View::DrawThreadMigrations( const TimelineContext& ctx, const int origOffse if( forceDraw || ( wakeupWidthPixels >= 0.5 ) ) { - DrawLine( draw, pw, startPos, wakecolor ); + DrawLine( draw, pw, startPos, wakecolor, wakeupLineSize ); draw->AddCircleFilled( pw, bgSize, wakecolor ); // Vertical line at beginning of thread to emphasize wakeup if( wakeupWidthPixels >= 3 ) { - DrawLine( draw, ImVec2{ startPos.x, startPos.y - sty * 0.5f }, ImVec2{ startPos.x , startPos.y + sty * 0.5f }, 0xFF000000, bgSize ); - DrawLine( draw, ImVec2{ startPos.x, startPos.y - sty * 0.5f }, ImVec2{ startPos.x , startPos.y + sty * 0.5f }, wakecolor ); + DrawLine( draw, ImVec2{ startPos.x, startPos.y - sty * 0.5f }, ImVec2{ startPos.x , startPos.y + sty * 0.5f + 1 }, 0xFF000000, lnSize * 2 ); + DrawLine( draw, ImVec2{ startPos.x, startPos.y - sty * 0.5f }, ImVec2{ startPos.x , startPos.y + sty * 0.5f + 1 }, wakecolor, lnSize ); } } }