From 7e999e37a5cf65e466091f4d8eeb36a6cea20f52 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Fri, 8 Sep 2017 19:09:57 -0700 Subject: *: use fragment generator Rather than laying out all fragments in a frame up-front in ray_module_t.prepare_frame(), return a fragment generator (rototiller_fragmenter_t) which produces the numbered fragment as needed. This removes complexity from the serially-executed prepare_frame() and allows the individual fragments to be computed in parallel by the different threads. It also eliminates the need for a fragments array in the rototiller_frame_t, indeed rototiller_frame_t is eliminated altogether. --- src/threads.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/threads.h') diff --git a/src/threads.h b/src/threads.h index f7eec81..152661f 100644 --- a/src/threads.h +++ b/src/threads.h @@ -11,7 +11,7 @@ typedef struct threads_t threads_t; threads_t * threads_create(); void threads_destroy(threads_t *threads); -void threads_frame_submit(threads_t *threads, rototiller_frame_t *frame, void (*render_fragment_func)(void *context, fb_fragment_t *fragment), void *context); +void threads_frame_submit(threads_t *threads, fb_fragment_t *fragment, rototiller_fragmenter_t fragmenter, void (*render_fragment_func)(void *context, fb_fragment_t *fragment), void *context); void threads_wait_idle(threads_t *threads); unsigned threads_num_threads(threads_t *threads); -- cgit v1.2.1