summaryrefslogtreecommitdiff
path: root/src/modules/sparkler/draw.h
blob: 10701e016b8a4370e0d0054afc9e0bef9e1efa8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef _DRAW_H
#define _DRAW_H

#include <stdint.h>

#include "fb.h"


static inline void draw_pixel(fb_fragment_t *f, int x, int y, uint32_t pixel)
{
	uint32_t	*pixels = f->buf;

	/* FIXME this assumes stride is aligned to 4 */
	pixels[(y * (f->width + (f->stride >> 2))) + x] = pixel;
}

#endif
© All Rights Reserved