From d28ceb85a6b43a503c608116798945baab0e060f Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 22 Apr 2017 15:29:49 -0700 Subject: *: 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. --- src/modules/plasma/plasma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/plasma') diff --git a/src/modules/plasma/plasma.c b/src/modules/plasma/plasma.c index 8c3e921..9acd73f 100644 --- a/src/modules/plasma/plasma.c +++ b/src/modules/plasma/plasma.c @@ -43,7 +43,7 @@ static void init_plasma(int32_t *costab, int32_t *sintab) /* Prepare a frame for concurrent drawing of fragment using multiple fragments */ -static void plasma_prepare_frame(unsigned n_cpus, fb_fragment_t *fragment, rototiller_frame_t *res_frame) +static void plasma_prepare_frame(void *context, unsigned n_cpus, fb_fragment_t *fragment, rototiller_frame_t *res_frame) { static int initialized; @@ -61,7 +61,7 @@ static void plasma_prepare_frame(unsigned n_cpus, fb_fragment_t *fragment, rotot /* Draw a plasma effect */ -static void plasma_render_fragment(fb_fragment_t *fragment) +static void plasma_render_fragment(void *context, fb_fragment_t *fragment) { unsigned stride = fragment->stride / 4, width = fragment->width, height = fragment->height; -- cgit v1.2.3