summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-08 11:50:14 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-08 22:56:45 +0100
commit61c27c15568d841b24154be2603827ccdf521d6b (patch)
treec2d7871d9f6552ca5cac19e61fa1d0ff6c9e7e82 /scripts
parentcdce17f82062c04197f4a0e981bd4b76e0def1cb (diff)
downloadpoky-61c27c15568d841b24154be2603827ccdf521d6b.tar.gz
scripts/pybootchart/draw: Fix some bounding problems
The chart size extents were being incorrectly reported, not accounting for the width of the legend. Set a minimum width to account for that (its fixed size). Also stop printing the chart background off the bottom of the chart extents. (From OE-Core rev: ef257afb772daf721f12cb3ff9708d39da06f2c9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/pybootchartgui/pybootchartgui/draw.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py
index b3184411cb..add5c53882 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -342,6 +342,10 @@ def extents(options, xscale, trace):
342 if trace.mem_stats: 342 if trace.mem_stats:
343 h += meminfo_bar_h 343 h += meminfo_bar_h
344 344
345 # Allow for width of process legend and offset
346 if w < (720 + off_x):
347 w = 720 + off_x
348
345 return (w, h) 349 return (w, h)
346 350
347def clip_visible(clip, rect): 351def clip_visible(clip, rect):
@@ -490,7 +494,7 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
490 return curr_y 494 return curr_y
491 495
492def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w): 496def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w):
493 chart_rect = [off_x, curr_y+header_h, w, h - 2 * off_y - header_h - leg_s + proc_h] 497 chart_rect = [off_x, curr_y+header_h, w, h - curr_y - 1 * off_y - header_h ]
494 498
495 draw_legend_box (ctx, "Configure", \ 499 draw_legend_box (ctx, "Configure", \
496 TASK_COLOR_CONFIGURE, off_x , curr_y + 45, leg_s) 500 TASK_COLOR_CONFIGURE, off_x , curr_y + 45, leg_s)