diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2019-11-24 01:19:06 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2019-11-24 01:19:06 -0800 |
commit | 53cc747fd2bdd774bc6f27f8aca5749c664b5cc7 (patch) | |
tree | b786391e503379d539919657f01ea9eafd28292b /src/sdl_fb.c | |
parent | 6bfd66051632fdb8eca4103df2c3c67492d28af7 (diff) |
fb: add pitch to fb_fragment_t
The put_pixel helpers really needed reworking to properly handle
subframe fragments modules like montage will utilize. I had the
stride present as it's convenient for a number of modules that
maintain a buf pointer as they progress down a row, but the pitch
is more applicable to put_pixel for scaling the y coordinate.
Now there's both pitch and stride so everyone's happy with what's
most convenient for their needs.
Diffstat (limited to 'src/sdl_fb.c')
-rw-r--r-- | src/sdl_fb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sdl_fb.c b/src/sdl_fb.c index 8d0241b..a3eb0d1 100644 --- a/src/sdl_fb.c +++ b/src/sdl_fb.c @@ -195,6 +195,7 @@ static void * sdl_fb_page_alloc(void *context, fb_page_t *res_page) res_page->fragment.height = c->height; res_page->fragment.frame_height = c->height; res_page->fragment.stride = p->surface->pitch - (c->width * 4); + res_page->fragment.pitch = p->surface->pitch; return p; } |