summaryrefslogtreecommitdiff
path: root/src/threads.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2017-04-22 15:29:49 -0700
committerVito Caputo <vcaputo@pengaru.com>2017-04-22 15:29:49 -0700
commitd28ceb85a6b43a503c608116798945baab0e060f (patch)
tree1a96ae21cbab1ef8fdf831d588fd2c9477fb3f92 /src/threads.h
parent1ff4632e895202c4485818f6e748e773b6fd2859 (diff)
*: add module context machinery
introduces create_context() and destroy_context() methods, and adds a 'void *context' first parameter to the module methods. If a module doesn't supply create_context() then NULL is simply passed around as the context, so trivial modules can continue to only implement render_fragment(). A subsequent commit will update the modules to encapsulate their global state in module-specific contexts.
Diffstat (limited to 'src/threads.h')
-rw-r--r--src/threads.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/threads.h b/src/threads.h
index 5926328..f7eec81 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)(fb_fragment_t *fragment));
+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_wait_idle(threads_t *threads);
unsigned threads_num_threads(threads_t *threads);
© All Rights Reserved