summaryrefslogtreecommitdiff
path: root/src/modules/montage
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2022-06-14 02:28:36 -0700
committerVito Caputo <vcaputo@pengaru.com>2022-08-07 06:51:36 -0700
commit5a0776f1fdc6b7780cd21d568150e804347a6f8a (patch)
tree646f1c6e73cd9d7cb63306a840879a0a64aebbed /src/modules/montage
parent4eb5f55bb0087769e47d0dc745a831440c5041fe (diff)
til: til_fb_fragment_t **fragment_ptr all the things
Preparatory commit for enabling cloneable/swappable fragments There's an outstanding issue with the til_fb_page_t submission, see comments. Doesn't matter for now since cloning doesn't happen yet, but will need to be addressed before they do.
Diffstat (limited to 'src/modules/montage')
-rw-r--r--src/modules/montage/montage.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/modules/montage/montage.c b/src/modules/montage/montage.c
index 7991e3f..eaf8be7 100644
--- a/src/modules/montage/montage.c
+++ b/src/modules/montage/montage.c
@@ -18,8 +18,8 @@ typedef struct montage_context_t {
static til_module_context_t * montage_create_context(unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup);
static void montage_destroy_context(til_module_context_t *context);
-static void montage_prepare_frame(til_module_context_t *context, unsigned ticks, til_fb_fragment_t *fragment, til_frame_plan_t *res_frame_plan);
-static void montage_render_fragment(til_module_context_t *context, unsigned ticks, unsigned cpu, til_fb_fragment_t *fragment);
+static void montage_prepare_frame(til_module_context_t *context, unsigned ticks, til_fb_fragment_t **fragment_ptr, til_frame_plan_t *res_frame_plan);
+static void montage_render_fragment(til_module_context_t *context, unsigned ticks, unsigned cpu, til_fb_fragment_t **fragment_ptr);
til_module_t montage_module = {
@@ -184,15 +184,16 @@ static int montage_fragmenter(til_module_context_t *context, const til_fb_fragme
}
-static void montage_prepare_frame(til_module_context_t *context, unsigned ticks, til_fb_fragment_t *fragment, til_frame_plan_t *res_frame_plan)
+static void montage_prepare_frame(til_module_context_t *context, unsigned ticks, til_fb_fragment_t **fragment_ptr, til_frame_plan_t *res_frame_plan)
{
*res_frame_plan = (til_frame_plan_t){ .fragmenter = montage_fragmenter };
}
-static void montage_render_fragment(til_module_context_t *context, unsigned ticks, unsigned cpu, til_fb_fragment_t *fragment)
+static void montage_render_fragment(til_module_context_t *context, unsigned ticks, unsigned cpu, til_fb_fragment_t **fragment_ptr)
{
montage_context_t *ctxt = (montage_context_t *)context;
+ til_fb_fragment_t *fragment = *fragment_ptr;
if (fragment->number >= ctxt->n_modules) {
til_fb_fragment_clear(fragment);
@@ -200,5 +201,5 @@ static void montage_render_fragment(til_module_context_t *context, unsigned tick
return;
}
- til_module_render(ctxt->contexts[fragment->number], ticks, fragment);
+ til_module_render(ctxt->contexts[fragment->number], ticks, fragment_ptr);
}
© All Rights Reserved