summaryrefslogtreecommitdiff
path: root/modules/sparkler/draw.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@gnugeneration.com>2017-01-18 19:12:41 -0800
committerGitHub <noreply@github.com>2017-01-18 19:12:41 -0800
commit467137113c8b3d6bcb73ecff8c76f23793f25cb7 (patch)
treeecf3064d6587ec875d5c021d46d44855dc814212 /modules/sparkler/draw.h
parentee2073d4e411555aba878277131b56f7eb562c84 (diff)
parent404a356b2b22a134aea151145d1baabf253ee491 (diff)
Merge build system cleanups
- Move source to src/ subdir - Use $(top_srcdir)/src instead of ../../
Diffstat (limited to 'modules/sparkler/draw.h')
-rw-r--r--modules/sparkler/draw.h32
1 files changed, 0 insertions, 32 deletions
diff --git a/modules/sparkler/draw.h b/modules/sparkler/draw.h
deleted file mode 100644
index 5010374..0000000
--- a/modules/sparkler/draw.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef _DRAW_H
-#define _DRAW_H
-
-#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)
-{
- r = (((float)intensity) * r);
- g = (((float)intensity) * g);
- b = (((float)intensity) * b);
-
- 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
© All Rights Reserved