From bc8d270bb296f985deb9e37e29e41d445daaac28 Mon Sep 17 00:00:00 2001 From: compudj Date: Sun, 15 Aug 2004 01:43:18 +0000 Subject: [PATCH] draw closure in cfv optimisation git-svn-id: http://ltt.polymtl.ca/svn@770 04897980-b3bd-0310-b5e0-8ef037075253 --- .../lttv/modules/gui/controlflow/eventhooks.c | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c b/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c index 9556d2dd..fc23e17c 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c @@ -3127,6 +3127,7 @@ typedef struct _ClosureData { EventsRequest *events_request; LttvTracesetState *tss; LttTime end_time; + guint x_end; } ClosureData; @@ -3205,13 +3206,8 @@ void draw_closure(gpointer key, gpointer value, gpointer user_data) #endif //EXTRA_CHECK Drawing_t *drawing = control_flow_data->drawing; guint width = drawing->width; - guint x; - convert_time_to_pixels( - time_window, - evtime, - width, - &x); + guint x = closure_data->x_end; DrawContext draw_context; @@ -3329,6 +3325,16 @@ int after_request(void *hook_data, void *call_data) closure_data.tss = tss; closure_data.end_time = end_time; + TimeWindow time_window = + lttvwindow_get_time_window(control_flow_data->tab); + guint width = control_flow_data->drawing->width; + convert_time_to_pixels( + time_window, + end_time, + width, + &closure_data.x_end); + + /* Draw last items */ g_hash_table_foreach(process_list->process_hash, draw_closure, (void*)&closure_data); @@ -3367,6 +3373,15 @@ int after_chunk(void *hook_data, void *call_data) closure_data.tss = tss; closure_data.end_time = end_time; + TimeWindow time_window = + lttvwindow_get_time_window(control_flow_data->tab); + guint width = control_flow_data->drawing->width; + convert_time_to_pixels( + time_window, + end_time, + width, + &closure_data.x_end); + /* Draw last items */ g_hash_table_foreach(process_list->process_hash, draw_closure, (void*)&closure_data); -- 2.34.1