summaryrefslogtreecommitdiff
path: root/src/modules/stub/stub.c
blob: 153b519285260c5a411b84afb74b3cd5840fb7dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "fb.h"
#include "rototiller.h"

/* This sample fills the frame with white pixels in a non-threaded manner,
 * replace the body of stub_render_fragment() with your own algorithm.
 */

static void stub_render_fragment(void *context, unsigned cpu, fb_fragment_t *fragment)
{
	for (unsigned y = fragment->y; y < fragment->y + fragment->height; y++) {
		for (unsigned x = fragment->x; x < fragment->x + fragment->width; x++) {
			fb_fragment_put_pixel_unchecked(fragment, x, y, 0xffffffff);
		}
	}
}


rototiller_module_t	stub_module = {
	.render_fragment = stub_render_fragment,
	.name = "stub",
	.description = "Minimal stub sample module",
	.author = "Your Name <your@email.address>",
	.license = "License",
};