Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'server/TracySourceView.cpp')
-rw-r--r--server/TracySourceView.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp
index 5e17aaff..bd774901 100644
--- a/server/TracySourceView.cpp
+++ b/server/TracySourceView.cpp
@@ -228,6 +228,12 @@ static void PrintSourceFragment( const SourceContents& src, uint32_t srcline, in
constexpr float JumpSeparationBase = 6;
constexpr float JumpArrowBase = 9;
+float SourceView::CalcJumpSeparation( float scale )
+{
+ return round( JumpSeparationBase * scale );
+}
+
+
SourceView::SourceView()
: m_font( nullptr )
, m_smallFont( nullptr )
@@ -2512,7 +2518,7 @@ uint64_t SourceView::RenderSymbolAsmView( const AddrStatData& as, Worker& worker
const auto maxAddr = m_asm[clipper.DisplayEnd-1].addr;
const auto mjl = m_maxJumpLevel;
const auto JumpArrow = JumpArrowBase * ts.y / 15;
- const auto JumpSeparation = round( JumpSeparationBase * ts.y / 15 );
+ const auto JumpSeparation = CalcJumpSeparation( ts.y / 15 );
int i = -1;
for( auto& v : m_jumpTable )
@@ -3905,7 +3911,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
m_jumpOffset = xoff;
const auto JumpArrow = JumpArrowBase * ty / 15;
- const auto JumpSeparation = round( JumpSeparationBase * ts.y / 15 );
+ const auto JumpSeparation = CalcJumpSeparation( ts.y / 15 );
ImGui::SameLine( 0, ty + JumpArrow + m_maxJumpLevel * JumpSeparation );
auto jit = m_jumpOut.find( line.addr );
if( jit != m_jumpOut.end() )