diff options
-rw-r--r-- | src/til_fb.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/til_fb.h b/src/til_fb.h index 5504457..6dd0975 100644 --- a/src/til_fb.h +++ b/src/til_fb.h @@ -97,8 +97,11 @@ static inline void til_fb_fragment_fill(til_fb_fragment_t *fragment, uint32_t pi void *buf = fragment->buf; /* TODO: there should be a fast-path for non-divided fragments where there's no stride to skip */ - for (int y = 0; y < fragment->height; y++, buf += fragment->pitch) - memset(buf, pixel, fragment->pitch - fragment->stride); + for (int y = 0; y < fragment->height; y++, buf += fragment->pitch) { + /* TODO: this should use something memset-like for perf */ + for (int x = 0; x < fragment->width; x++) + ((uint32_t *)buf)[x] = pixel; + } } |