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/drm_fb.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/drm_fb.c') diff --git a/src/drm_fb.c b/src/drm_fb.c index 3d0f6ba..cfaae29 100644 --- a/src/drm_fb.c +++ b/src/drm_fb.c @@ -455,6 +455,7 @@ static void * drm_fb_page_alloc(void *context, fb_page_t *res_page) res_page->fragment.height = c->mode->vdisplay; res_page->fragment.frame_height = c->mode->vdisplay; res_page->fragment.stride = create_dumb.pitch - (c->mode->hdisplay * 4); + res_page->fragment.pitch = create_dumb.pitch; return p; } -- cgit v1.2.1