draw closure in cfv optimisation
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Sun, 15 Aug 2004 01:43:18 +0000 (01:43 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Sun, 15 Aug 2004 01:43:18 +0000 (01:43 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@770 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c

index 9556d2dde030dabee402e868c3375615fb17a040..fc23e17ceadb3e443c3018f612ebef1663e058e0 100644 (file)
@@ -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);
This page took 0.025706 seconds and 4 git commands to generate.