Add 'reference' to the iterator_traits, needed by LegacyIterator reqs
[LibreOffice.git] / config_host / config_skia.h.in
blobb98ba14d31ece456ec2238c0f4324a0ff9bb345d
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_SUPPORT_GPU
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 // Set by Skia's BUILD.gn.
44 #define GR_OP_ALLOCATE_USE_NEW
46 #define SK_CODEC_DECODES_PNG 1
47 #define SK_ENCODE_PNG 1
49 // These are just to avoid warnings (some headers use them even with GL disabled).
50 #define SK_ASSUME_GL 1
51 #define SK_ASSUME_GL_ES 0
53 #define SK_ENABLE_SKSL 1
55 // See https://codereview.chromium.org/2089583002 . This makes raster drawing
56 // faster in some cases, it was made conditional because of some tests failing,
57 // but if I'm reading the review correctly the code is in fact fine and just
58 // those tests needed updating, which presumably has never happened.
59 #define SK_DRAWBITMAPRECT_FAST_OFFSET 1
61 // Default to BGRA. Skia already defaults to that on Windows, and it seems
62 // the default X11 visual is actually also BGRA.
63 #define SK_R32_SHIFT 16
65 // Enable Skia's internal checks depending on DBG_UTIL mode. ENABLE_SKIA_DEBUG
66 // controls whether to build with or without optimizations (set in Makefile).
67 #ifdef DBG_UTIL
69 #define SK_DEBUG
71 #define SK_ENABLE_DUMP_GPU
73 #else
75 #define SK_RELEASE
77 #endif // DBG_UTIL
79 // TODO ?
80 //#define SK_R32_SHIFT 16
82 #endif