summaryrefslogtreecommitdiffstats
path: root/scripts/pybootchartgui/pybootchartgui/draw.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/pybootchartgui/pybootchartgui/draw.py')
-rw-r--r--scripts/pybootchartgui/pybootchartgui/draw.py53
1 files changed, 27 insertions, 26 deletions
diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py
index 16830fa456..1b872de75e 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -287,32 +287,33 @@ def render(ctx, res):
287 287
288 offset = min(res.start.keys()) 288 offset = min(res.start.keys())
289 for s in sorted(res.start.keys()): 289 for s in sorted(res.start.keys()):
290 task = res.start[s].split(":")[1] 290 for val in sorted(res.start[s]):
291 #print res.start[s] 291 task = val.split(":")[1]
292 #print res.processes[res.start[s]][1] 292 #print val
293 #print s 293 #print res.processes[val][1]
294 x = (s - offset) * sec_w 294 #print s
295 w = ((res.processes[res.start[s]][1] - s) * sec_w) 295 x = (s - offset) * sec_w
296 296 w = ((res.processes[val][1] - s) * sec_w)
297 #print "proc at %s %s %s %s" % (x, y, w, proc_h) 297
298 col = None 298 #print "proc at %s %s %s %s" % (x, y, w, proc_h)
299 if task == "do_compile": 299 col = None
300 col = TASK_COLOR_COMPILE 300 if task == "do_compile":
301 elif task == "do_configure": 301 col = TASK_COLOR_COMPILE
302 col = TASK_COLOR_CONFIGURE 302 elif task == "do_configure":
303 elif task == "do_install": 303 col = TASK_COLOR_CONFIGURE
304 col = TASK_COLOR_INSTALL 304 elif task == "do_install":
305 elif task == "do_package": 305 col = TASK_COLOR_INSTALL
306 col = TASK_COLOR_PACKAGE 306 elif task == "do_package":
307 elif task == "do_populate_sysroot": 307 col = TASK_COLOR_PACKAGE
308 col = TASK_COLOR_SYSROOT 308 elif task == "do_populate_sysroot":
309 309 col = TASK_COLOR_SYSROOT
310 draw_rect(ctx, PROC_BORDER_COLOR, (x, y, w, proc_h)) 310
311 if col: 311 draw_rect(ctx, PROC_BORDER_COLOR, (x, y, w, proc_h))
312 draw_fill_rect(ctx, col, (x, y, w, proc_h)) 312 if col:
313 313 draw_fill_rect(ctx, col, (x, y, w, proc_h))
314 draw_label_in_box(ctx, PROC_TEXT_COLOR, res.start[s], x, y + proc_h - 4, w, proc_h) 314
315 y = y + proc_h 315 draw_label_in_box(ctx, PROC_TEXT_COLOR, val, x, y + proc_h - 4, w, proc_h)
316 y = y + proc_h
316 317
317 # draw process boxes 318 # draw process boxes
318 #draw_process_bar_chart(ctx, proc_tree, curr_y + bar_h, w, h) 319 #draw_process_bar_chart(ctx, proc_tree, curr_y + bar_h, w, h)