summaryrefslogtreecommitdiff
path: root/src/codec/stb_image.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/codec/stb_image.c')
-rw-r--r--src/codec/stb_image.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/codec/stb_image.c b/src/codec/stb_image.c
index b37d6da..39b3a13 100644
--- a/src/codec/stb_image.c
+++ b/src/codec/stb_image.c
@@ -1,5 +1,27 @@
#define AL_LOG_SECTION "stb_image"
#include <al/log.h>
+
+#ifdef CAMU_STBI_USE_WUFFS
+#define WUFFS_IMPLEMENTATION
+#define WUFFS_CONFIG__MODULES
+#define WUFFS_CONFIG__MODULE__BASE
+#define WUFFS_CONFIG__MODULE__ADLER32
+#define WUFFS_CONFIG__MODULE__DEFLATE
+#define WUFFS_CONFIG__MODULE__ZLIB
+#define WUFFS_CONFIG__MODULE__CRC32
+#define WUFFS_CONFIG__MODULE__PNG
+#define WUFFS_CONFIG__MODULE__JPEG
+#define WUFFS_CONFIG__MODULE__IMAGE
+#define WUFFS_CONFIG__DST_PIXEL_FORMAT__ENABLE_ALLOWLIST
+#define WUFFS_CONFIG__DST_PIXEL_FORMAT__ALLOW_Y
+#define WUFFS_CONFIG__DST_PIXEL_FORMAT__ALLOW_RGBA_NONPREMUL
+#define WUFFS_CONFIG__ENABLE_DROP_IN_REPLACEMENT__STB
+#ifdef CAMU_LOCAL_WUFFS
+#include <wuffs-unsupported-snapshot.c>
+#else
+#include <wuffs/wuffs-v0.4.c>
+#endif
+#else
#include "common.h"
#define STBI_MALLOC camu_page_alloc
#define STBI_FREE al_free
@@ -13,6 +35,7 @@
#else
#include <stb/stb_image.h>
#endif
+#endif
#include "stb_image.h"