Bump version to 24.04.3.4
[LibreOffice.git] / config_host / config_skia.h.in
blob602e18a3f67b4e504deca622dc451f02b9eee6a3
1 /*
3 Settings for the Skia library. We compile the Skia library with these
4 settings and also LO code uses this header to ensure the settings
5 are the same.
6 */
8 #ifndef CONFIG_SKIA_H
9 #define CONFIG_SKIA_H
11 // This is a setting that should be set manually and it affects LO
12 // code rather than Skia itself. It basically controls setting
13 // BackendCapabilities::mbSupportsBitmap32, i.e. whether one LO bitmap
14 // contains all the 32bits of an image including the alpha (premultiplied).
16 // Since Skia does not natively support 24bpp, the preferred setup is
17 // that the setting should be enabled, it makes the code faster and cleaner.
19 // Unfortunately VCL historically splits alpha into a whole separate
20 // bitmap and works with 24bpp+8bpp, which is generally more complicated,
21 // more error-prone and just worse, but that's how LO code has been
22 // written and so there are many places in LO that expect this and
23 // do not work correctly with true 32bpp bitmaps.
25 // So ultimately the 24+8 split should be dumped (preferably in all of LO,
26 // not just the Skia-related code), but until all of LO works correctly
27 // with 32bpp keep this disabled in order to avoid such breakages.
29 //#define SKIA_USE_BITMAP32 1
30 #define SKIA_USE_BITMAP32 0
33 // GPU support (set by configure).
34 #undef SK_GANESH
35 // Vulkan support enabled (set by configure).
36 #undef SK_VULKAN
37 // Metal support enabled (set by configure).
38 #undef SK_METAL
40 // Memory allocator for Vulkan.
41 #define SK_USE_VMA 1
43 #define SK_CODEC_DECODES_PNG 1
44 #define SK_ENCODE_PNG 1
46 // These are just to avoid warnings (some headers use them even with GL disabled).
47 #define SK_ASSUME_GL 1
48 #define SK_ASSUME_GL_ES 0
50 #define SK_ENABLE_SKSL 1
52 // See https://codereview.chromium.org/2089583002 . This makes raster drawing
53 // faster in some cases, it was made conditional because of some tests failing,
54 // but if I'm reading the review correctly the code is in fact fine and just
55 // those tests needed updating, which presumably has never happened.
56 #define SK_DRAWBITMAPRECT_FAST_OFFSET 1
58 // Default to BGRA. Skia already defaults to that on Windows, and it seems
59 // the default X11 visual is actually also BGRA.
60 #define SK_R32_SHIFT 16
62 // Enable Skia's internal checks depending on DBG_UTIL mode.
63 // ENABLE_SKIA_DEBUG controls whether to build with or without optimizations, and
64 // is set by using --enable-skia=debug.
65 #ifdef DBG_UTIL
67 #define SK_DEBUG
69 #define SK_ENABLE_DUMP_GPU
71 #else
73 #define SK_RELEASE
75 #endif // DBG_UTIL
77 // TODO ?
78 //#define SK_R32_SHIFT 16
80 #endif