commit 61cf1ee

Michael Forney  ·  2013-06-14 11:22:28 +0000 UTC
parent e03df4d
Modify repaint operation
1 files changed,  +5, -6
+5, -6
 1@@ -15,17 +15,17 @@ const char default_seat[] = "seat0";
 2 
 3 struct repaint_operation
 4 {
 5-    struct swc_renderer * renderer;
 6+    struct swc_compositor * compositor;
 7     struct swc_output * output;
 8-    struct wl_list * surfaces;
 9 };
10 
11 static void repaint_output(void * data)
12 {
13     struct repaint_operation * operation = data;
14+    struct swc_compositor * compositor = operation->compositor;
15 
16-    swc_renderer_repaint_output(operation->renderer, operation->output,
17-                                operation->surfaces);
18+    swc_renderer_repaint_output(&compositor->renderer, operation->output,
19+                                &compositor->surfaces);
20 
21     swc_output_switch_buffer(operation->output);
22 
23@@ -45,9 +45,8 @@ static void schedule_repaint_for_output(struct swc_compositor * compositor,
24         return;
25 
26     operation = malloc(sizeof *operation);
27-    operation->renderer = &compositor->renderer;
28+    operation->compositor = compositor;
29     operation->output = output;
30-    operation->surfaces = &compositor->surfaces;
31 
32     event_loop = wl_display_get_event_loop(compositor->display);
33     wl_event_loop_add_idle(event_loop, &repaint_output, operation);