Skip to content

Commit

Permalink
Set minimum size for folded flame graph items.
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfpld committed Oct 27, 2024
1 parent 2097e3c commit 55ea2a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions profiler/src/profiler/TracyView_FlameGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ void View::DrawFlameGraphLevel( const std::vector<FlameGraphItem>& data, FlameGr
}
const auto px0 = ( it->begin - vStart ) * pxns;
const auto px1 = ( (next-1)->begin + (next-1)->time - vStart ) * pxns;
draw->AddRectFilled( ImVec2( wpos.x + px0, wpos.y + depth * ostep ), ImVec2( wpos.x + px1, wpos.y + ( depth + 1 ) * ostep ), 0xFF666666 );
DrawZigZag( draw, ImVec2( wpos.x, wpos.y + ( depth + 0.5f ) * ostep ), px0, px1, ctx.ty / 4, 0xFF444444 );
draw->AddRectFilled( ImVec2( wpos.x + px0, wpos.y + depth * ostep ), ImVec2( wpos.x + std::max( px1, px0 + MinVisSize ), wpos.y + ( depth + 1 ) * ostep ), 0xFF666666 );
DrawZigZag( draw, ImVec2( wpos.x, wpos.y + ( depth + 0.5f ) * ostep ), px0, std::max( px1, px0 + MinVisSize ), ctx.ty / 4, 0xFF444444 );
it = next;
}
else
Expand Down

0 comments on commit 55ea2a2

Please sign in to comment.