diff options
| author | Vito Caputo <vcaputo@gnugeneration.com> | 2017-02-03 16:08:01 -0800 | 
|---|---|---|
| committer | Vito Caputo <vcaputo@gnugeneration.com> | 2017-02-03 16:08:01 -0800 | 
| commit | a7c44b6146e306b13b63b8bececa6b7bc8ed59fb (patch) | |
| tree | b12e43f14e3a2dc1fe735dbf71a9862d798623a1 /src/modules/stars/draw.h | |
| parent | f21492a1e8314e27ef307bc4b2629468d40e6c72 (diff) | |
stars: use fb_fragment_put_pixel_unchecked()
drop draw_pixel() duplication
Diffstat (limited to 'src/modules/stars/draw.h')
| -rw-r--r-- | src/modules/stars/draw.h | 16 | 
1 files changed, 0 insertions, 16 deletions
| diff --git a/src/modules/stars/draw.h b/src/modules/stars/draw.h index 5010374..0b68c00 100644 --- a/src/modules/stars/draw.h +++ b/src/modules/stars/draw.h @@ -3,8 +3,6 @@  #include <stdint.h> -#include "fb.h" -  /* helper for scaling rgb colors and packing them into an pixel */  static inline uint32_t makergb(uint32_t r, uint32_t g, uint32_t b, float intensity)  { @@ -15,18 +13,4 @@ static inline uint32_t makergb(uint32_t r, uint32_t g, uint32_t b, float intensi  	return (((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff));  } -static inline int draw_pixel(fb_fragment_t *f, int x, int y, uint32_t pixel) -{ -	uint32_t	*pixels = f->buf; - -	if (y < 0 || y >= f->height || x < 0 || x >= f->width) { -		return 0; -	} - -	/* FIXME this assumes stride is aligned to 4 */ -	pixels[(y * (f->width + (f->stride >> 2))) + x] = pixel; - -	return 1; -} -  #endif | 
