diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2017-04-22 07:53:17 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2017-04-22 07:53:17 -0700 |
commit | 4c6e8e280ba8f540bf1691ec1b427ad1d52401aa (patch) | |
tree | 9feba131d0530c812cb69268a3afa56dd6aa8f8b /src/fb.c | |
parent | 406495a01b1de41abc1b9240096da3741155b6fd (diff) |
fb: add frame_{width,height} to fb_fragment_t
Modules need to know the overall dimensions of the frame the fragment
they're rendering is part of. Previously it wasn't really necessary
since the fragments supplied to the modules had always been the full
page, but that's changing.
This commit also changes the julia module to use the frame dimensions,
others will need updating as well.
Diffstat (limited to 'src/fb.c')
-rw-r--r-- | src/fb.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -172,7 +172,9 @@ static void fb_page_new(fb_t *fb, drmModeModeInfoPtr mode) page->public_page.fragment.buf = map; page->public_page.fragment.width = mode->hdisplay; + page->public_page.fragment.frame_width = mode->hdisplay; page->public_page.fragment.height = mode->vdisplay; + page->public_page.fragment.frame_height = mode->vdisplay; page->public_page.fragment.stride = create_dumb.pitch - (mode->hdisplay * 4); page->next = fb->inactive_pages; @@ -338,6 +340,8 @@ void fb_fragment_divide(fb_fragment_t *fragment, unsigned n_fragments, fb_fragme fragments[i].y = y; fragments[i].width = fragment->width; fragments[i].height = slice; + fragments[i].frame_width = fragment->frame_width; + fragments[i].frame_height = fragment->frame_height; fragments[i].stride = fragment->stride; buf += pitch * slice; |