diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2022-06-14 02:28:36 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2022-08-07 06:51:36 -0700 |
commit | 5a0776f1fdc6b7780cd21d568150e804347a6f8a (patch) | |
tree | 646f1c6e73cd9d7cb63306a840879a0a64aebbed /src/modules/checkers | |
parent | 4eb5f55bb0087769e47d0dc745a831440c5041fe (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/checkers')
-rw-r--r-- | src/modules/checkers/checkers.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/modules/checkers/checkers.c b/src/modules/checkers/checkers.c index 20ecd63..32b5aa3 100644 --- a/src/modules/checkers/checkers.c +++ b/src/modules/checkers/checkers.c @@ -200,9 +200,10 @@ static int checkers_fragmenter(til_module_context_t *context, const til_fb_fragm } -static void checkers_prepare_frame(til_module_context_t *context, unsigned ticks, til_fb_fragment_t *fragment, til_frame_plan_t *res_frame_plan) +static void checkers_prepare_frame(til_module_context_t *context, unsigned ticks, til_fb_fragment_t **fragment_ptr, til_frame_plan_t *res_frame_plan) { checkers_context_t *ctxt = (checkers_context_t *)context; + til_fb_fragment_t *fragment = *fragment_ptr; /* XXX: note cpu_affinity is required when fill_module is used, to ensure module_contexts * have a stable relationship to fragnum. Otherwise the output would be unstable because the @@ -227,9 +228,11 @@ static inline unsigned hash(unsigned x) } -static void checkers_render_fragment(til_module_context_t *context, unsigned ticks, unsigned cpu, til_fb_fragment_t *fragment) +static void checkers_render_fragment(til_module_context_t *context, unsigned ticks, unsigned cpu, til_fb_fragment_t **fragment_ptr) { checkers_context_t *ctxt = (checkers_context_t *)context; + til_fb_fragment_t *fragment = *fragment_ptr; + uint32_t color = ctxt->setup.color, flags = 0; checkers_fill_t fill = ctxt->setup.fill; int state; @@ -293,7 +296,7 @@ static void checkers_render_fragment(til_module_context_t *context, unsigned tic til_fb_fragment_fill(fragment, flags, color); else { /* TODO: we need a way to send down color and flags, and use the module render as a brush of sorts */ - til_module_render(ctxt->fill_module_contexts[cpu], ticks, fragment); + til_module_render(ctxt->fill_module_contexts[cpu], ticks, fragment_ptr); } } } |