summaryrefslogtreecommitdiff
path: root/src/rototiller.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2017-12-10 09:51:36 -0800
committerVito Caputo <vcaputo@pengaru.com>2017-12-10 12:15:20 -0800
commit1d73823602297ab490dc4222f63c1845f84a9e98 (patch)
treeb50a8e27d1dcdf861270e63ed117b8c3be18ac32 /src/rototiller.h
parent3249e0e65e7a9361eb3604d46496182fda9f83c0 (diff)
rototiller: introduce module.finish_frame()
Add a hook for post-render serialized frame completion, some of the renderers may have state to cleanup after rendering a frame. A future commit may change add a return value to control flow for features like multi-pass rendering within a given module. The raytracer for example may want to add concurrently executed post filters, and having a non-void return from finish_frame() would be a tidy way to tell rototiller "go back to prepare->render for this context" as many times as necessary, keeping the pass state in the context. For now its return is void however, as I just need a cleanup hook as the raytracer becomes more stateful per frame with a BIH spatial index in the works.
Diffstat (limited to 'src/rototiller.h')
-rw-r--r--src/rototiller.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rototiller.h b/src/rototiller.h
index beafc52..84b3842 100644
--- a/src/rototiller.h
+++ b/src/rototiller.h
@@ -12,6 +12,7 @@ typedef struct rototiller_module_t {
void (*destroy_context)(void *context);
void (*prepare_frame)(void *context, unsigned n_cpus, fb_fragment_t *fragment, rototiller_fragmenter_t *res_fragmenter);
void (*render_fragment)(void *context, fb_fragment_t *fragment);
+ void (*finish_frame)(void *context, fb_fragment_t *fragment);
char *name;
char *description;
char *author;
© All Rights Reserved