aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2023-01-21 19:30:25 +0100
committerMattias Andrée <maandree@kth.se>2023-01-21 19:32:34 +0100
commit4114f87af993991c7aab55ff86be3003d43244f3 (patch)
treeb5841672b4a48c02a9015ddc273f7b64ad9bec3a /common.h
parentAdd integer versions of libglitter_compose_* (diff)
downloadlibglitter-4114f87af993991c7aab55ff86be3003d43244f3.tar.gz
libglitter-4114f87af993991c7aab55ff86be3003d43244f3.tar.bz2
libglitter-4114f87af993991c7aab55ff86be3003d43244f3.tar.xz
Add render context
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--common.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/common.h b/common.h
new file mode 100644
index 0000000..e53843a
--- /dev/null
+++ b/common.h
@@ -0,0 +1,35 @@
+/* See LICENSE file for copyright and license details. */
+#ifndef LIBGLITTER_COMMON_H
+#define LIBGLITTER_COMMON_H
+
+#include "libglitter.h"
+#include <alloca.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdlib.h>
+
+
+#define RENDER_METHOD_VSTRIPS 0
+#define RENDER_METHOD_HSTRIPS 1
+#define RENDER_METHOD_SIMPLE 2
+#define RENDER_METHOD_GENERIC 3
+
+
+struct libglitter_context {
+};
+
+struct libglitter_render_context {
+ const uint8_t *restrict cellmap;
+ const uint8_t *restrict ncellvalues;
+ size_t noutputs;
+ size_t rowsize;
+ size_t widthmul;
+ size_t heightmul;
+ uint8_t render_method;
+ size_t cells[3][2];
+ double *restrict cellweights_double;
+ float *restrict cellweights_float;
+};
+
+
+#endif