diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2018-02-26 03:29:12 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2018-02-26 05:18:26 -0800 |
commit | 6fabe39ba8841ffe392c9b659505e12edaff43d6 (patch) | |
tree | 7a1f94427e9046679042225f1bd779067edab785 /src/fb.h | |
parent | 1bf11626543c2b0dd10e8e0e4f3f75c99ea4f16c (diff) |
rototiller,fb: swap dispatch with page flipping
For the sake of sdl_fb, move page flipping into the main thread
and run module render dispatch from another thread instead.
This eliminates the fb flipper thread, moving its functionality
into fb_flip() which synchronously consumes and performs a single
flip from the same queue as before - the function is verbatim
the loop body of the flipper thread.
Now main() calls fb_flip() in a loop where it previously dispatched
pages for rendering.
Rendering dispatch is now performed in a created thread.
See the comment in fb.c for more explanation of this shuffle.
Diffstat (limited to 'src/fb.h')
-rw-r--r-- | src/fb.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -47,6 +47,7 @@ void fb_page_put(fb_t *fb, fb_page_t *page); void fb_free(fb_t *fb); void fb_get_put_pages_count(fb_t *fb, unsigned *count); fb_t * fb_new(const fb_ops_t *ops, settings_t *settings, int n_pages); +int fb_flip(fb_t *fb); void fb_fragment_divide(fb_fragment_t *fragment, unsigned n_fragments, fb_fragment_t fragments[]); int fb_fragment_slice_single(const fb_fragment_t *fragment, unsigned n_fragments, unsigned num, fb_fragment_t *res_fragment); int fb_fragment_tile_single(const fb_fragment_t *fragment, unsigned tile_size, unsigned num, fb_fragment_t *res_fragment); |