add mem.h and memset32()
This commit is contained in:
parent
79951bd0f1
commit
b4b77dd52c
7
src/fb.c
7
src/fb.c
@ -1,5 +1,6 @@
|
||||
#include "fb.h"
|
||||
#include <stddef.h>
|
||||
#include "mem.h"
|
||||
|
||||
static uint32_t * fb;
|
||||
static uint32_t fb_width;
|
||||
@ -100,13 +101,9 @@ void fb_fill(int x, int y, int width, int height, uint8_t r, uint8_t g, uint8_t
|
||||
{
|
||||
uint32_t * target = &fb[fb_pitch * y / 4u + x];
|
||||
uint32_t pixel = build_pixel(r, g, b);
|
||||
/* TODO: use memset32() */
|
||||
for (int row = 0; row < height; row++)
|
||||
{
|
||||
for (int col = 0; col < width; col++)
|
||||
{
|
||||
target[col] = pixel;
|
||||
}
|
||||
memset32(target, pixel, width);
|
||||
target += fb_pitch / 4u;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user