diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2017-04-27 09:37:39 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2017-04-27 09:37:39 -0700 |
commit | 3d4ab5e29e6187d5e97892a7f8a1ce73e809e0cd (patch) | |
tree | 8c1963eb78b005e08bb6d23ce66b5ed743f054f7 /src/fb.h | |
parent | 3e2d1db3952e65e347faf496800ede12231c3b76 (diff) |
fb: apply fragment coordinates put pixel helper
fb_fragment_put_pixel_unchecked() assumed the x,y coordinates of
the fragment were always 0.
Diffstat (limited to 'src/fb.h')
-rw-r--r-- | src/fb.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -55,7 +55,7 @@ static inline void fb_fragment_put_pixel_unchecked(fb_fragment_t *fragment, int uint32_t *pixels = fragment->buf; /* FIXME this assumes stride is aligned to 4 */ - pixels[(y * (fragment->width + (fragment->stride >> 2))) + x] = pixel; + pixels[((y - fragment->y) * (fragment->width + (fragment->stride >> 2))) + (x - fragment->x)] = pixel; } |