summaryrefslogtreecommitdiffstats
path: root/config_host/config_skia.h.in
diff options
context:
space:
mode:
Diffstat (limited to 'config_host/config_skia.h.in')
-rw-r--r--config_host/config_skia.h.in67
1 files changed, 67 insertions, 0 deletions
diff --git a/config_host/config_skia.h.in b/config_host/config_skia.h.in
new file mode 100644
index 000000000..26c945b2c
--- /dev/null
+++ b/config_host/config_skia.h.in
@@ -0,0 +1,67 @@
+/*
+
+Settings for the Skia library. We compile the Skia library with these
+settings and also LO code uses this header to ensure the settings
+are the same.
+*/
+
+#ifndef CONFIG_SKIA_H
+#define CONFIG_SKIA_H
+
+// This a setting that should be set manually and it affects LO
+// code rather than Skia itself. It basically controls setting
+// BackendCapabilities::mbSupportsBitmap32.
+// Since Skia does not natively support 24bpp, the preferred setup is
+// that the setting should be enabled, it makes the code faster and cleaner.
+// Unfortunately VCL historically splits alpha into a whole separate
+// bitmap and works with 24bpp+8bpp, which is generally more complicated,
+// more error-prone and just worse, but that's how LO code has been
+// written and so there are many places in LO that expect this and
+// do not work correctly with true 32bpp bitmaps.
+// So ultimately the 24+8 split should be dumped (preferably in all of LO,
+// not just the Skia-related code), but until all of LO works correctly
+// with 32bpp disabling this will avoid such breakages.
+//#define SKIA_USE_BITMAP32 1
+#define SKIA_USE_BITMAP32 0
+
+
+/* TODO SKIA check all these */
+
+#define SK_SUPPORT_GPU 1
+
+#define SK_VULKAN 1
+
+// Memory allocator for Vulkan.
+#define SK_USE_VMA 1
+
+#define SK_CODEC_DECODES_PNG 1
+#define SK_ENCODE_PNG 1
+
+// These are just to avoid warnings (some headers use them even with GL disabled).
+#define SK_ASSUME_GL 1
+#define SK_ASSUME_GL_ES 0
+
+// See https://codereview.chromium.org/2089583002 . This makes raster drawing
+// faster in some cases, it was made conditional because of some tests failing,
+// but if I'm reading the review correctly the code is in fact fine and just
+// those tests needed updating, which presumably has never happened.
+#define SK_DRAWBITMAPRECT_FAST_OFFSET 1
+
+// Enable Skia's internal checks depending on DBG_UTIL mode. ENABLE_SKIA_DEBUG
+// controls whether to build with or without optimizations (set in Makefile).
+#ifdef DBG_UTIL
+
+#define SK_DEBUG
+
+#define SK_ENABLE_DUMP_GPU
+
+#else
+
+#define DSK_RELEASE
+
+#endif // DBG_UTIL
+
+// TODO ?
+//#define SK_R32_SHIFT 16
+
+#endif