From 53cc747fd2bdd774bc6f27f8aca5749c664b5cc7 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sun, 24 Nov 2019 01:19:06 -0800 Subject: 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. --- src/sdl_fb.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/sdl_fb.c') 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; } -- cgit v1.2.1