• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 ///////////////////////////////////////////////////////////////////////////////
3 //
4 // THIS FILE IS AUTOGENERATED BY GYP_TO_ANDROID.PY. DO NOT EDIT.
5 //
6 // This file contains Skia's upstream include/config/SkUserConfig.h as a
7 // reference, followed by the actual defines set for Android.
8 //
9 ///////////////////////////////////////////////////////////////////////////////
10 
11 
12 /*
13  * Copyright 2006 The Android Open Source Project
14  *
15  * Use of this source code is governed by a BSD-style license that can be
16  * found in the LICENSE file.
17  */
18 
19 
20 #ifndef SkUserConfig_DEFINED
21 #define SkUserConfig_DEFINED
22 
23 /*  SkTypes.h, the root of the public header files, does the following trick:
24 
25     #include "SkPreConfig.h"
26     #include "SkUserConfig.h"
27     #include "SkPostConfig.h"
28 
29     SkPreConfig.h runs first, and it is responsible for initializing certain
30     skia defines.
31 
32     SkPostConfig.h runs last, and its job is to just check that the final
33     defines are consistent (i.e. that we don't have mutually conflicting
34     defines).
35 
36     SkUserConfig.h (this file) runs in the middle. It gets to change or augment
37     the list of flags initially set in preconfig, and then postconfig checks
38     that everything still makes sense.
39 
40     Below are optional defines that add, subtract, or change default behavior
41     in Skia. Your port can locally edit this file to enable/disable flags as
42     you choose, or these can be delared on your command line (i.e. -Dfoo).
43 
44     By default, this include file will always default to having all of the flags
45     commented out, so including it will have no effect.
46 */
47 
48 ///////////////////////////////////////////////////////////////////////////////
49 
50 /*  Skia has lots of debug-only code. Often this is just null checks or other
51     parameter checking, but sometimes it can be quite intrusive (e.g. check that
52     each 32bit pixel is in premultiplied form). This code can be very useful
53     during development, but will slow things down in a shipping product.
54 
55     By default, these mutually exclusive flags are defined in SkPreConfig.h,
56     based on the presence or absence of NDEBUG, but that decision can be changed
57     here.
58  */
59 //#define SK_DEBUG
60 //#define SK_RELEASE
61 
62 /*  Skia has certain debug-only code that is extremely intensive even for debug
63     builds.  This code is useful for diagnosing specific issues, but is not
64     generally applicable, therefore it must be explicitly enabled to avoid
65     the performance impact. By default these flags are undefined, but can be
66     enabled by uncommenting them below.
67  */
68 //#define SK_DEBUG_GLYPH_CACHE
69 //#define SK_DEBUG_PATH
70 
71 /*  preconfig will have attempted to determine the endianness of the system,
72     but you can change these mutually exclusive flags here.
73  */
74 //#define SK_CPU_BENDIAN
75 //#define SK_CPU_LENDIAN
76 
77 /*  Most compilers use the same bit endianness for bit flags in a byte as the
78     system byte endianness, and this is the default. If for some reason this
79     needs to be overridden, specify which of the mutually exclusive flags to
80     use. For example, some atom processors in certain configurations have big
81     endian byte order but little endian bit orders.
82 */
83 //#define SK_UINT8_BITFIELD_BENDIAN
84 //#define SK_UINT8_BITFIELD_LENDIAN
85 
86 
87 /*  To write debug messages to a console, skia will call SkDebugf(...) following
88     printf conventions (e.g. const char* format, ...). If you want to redirect
89     this to something other than printf, define yours here
90  */
91 //#define SkDebugf(...)  MyFunction(__VA_ARGS__)
92 
93 /*
94  *  To specify a different default font cache limit, define this. If this is
95  *  undefined, skia will use a built-in value.
96  */
97 //#define SK_DEFAULT_FONT_CACHE_LIMIT   (1024 * 1024)
98 
99 /*
100  *  To specify the default size of the image cache, undefine this and set it to
101  *  the desired value (in bytes). SkGraphics.h as a runtime API to set this
102  *  value as well. If this is undefined, a built-in value will be used.
103  */
104 //#define SK_DEFAULT_IMAGE_CACHE_LIMIT (1024 * 1024)
105 
106 /*  Define this to allow PDF scalars above 32k.  The PDF/A spec doesn't allow
107     them, but modern PDF interpreters should handle them just fine.
108  */
109 //#define SK_ALLOW_LARGE_PDF_SCALARS
110 
111 /*  Define this to provide font subsetter in PDF generation.
112  */
113 //#define SK_SFNTLY_SUBSETTER "sfntly/subsetter/font_subsetter.h"
114 
115 /*  Define this to set the upper limit for text to support LCD. Values that
116     are very large increase the cost in the font cache and draw slower, without
117     improving readability. If this is undefined, Skia will use its default
118     value (e.g. 48)
119  */
120 //#define SK_MAX_SIZE_FOR_LCDTEXT     48
121 
122 /*  If SK_DEBUG is defined, then you can optionally define SK_SUPPORT_UNITTEST
123     which will run additional self-tests at startup. These can take a long time,
124     so this flag is optional.
125  */
126 #ifdef SK_DEBUG
127 //#define SK_SUPPORT_UNITTEST
128 #endif
129 
130 /*  Change the ordering to work in X windows.
131  */
132 #ifdef SK_SAMPLES_FOR_X
133         #define SK_R32_SHIFT    16
134         #define SK_G32_SHIFT    8
135         #define SK_B32_SHIFT    0
136         #define SK_A32_SHIFT    24
137 #endif
138 
139 
140 /* Determines whether to build code that supports the GPU backend. Some classes
141    that are not GPU-specific, such as SkShader subclasses, have optional code
142    that is used allows them to interact with the GPU backend. If you'd like to
143    omit this code set SK_SUPPORT_GPU to 0. This also allows you to omit the gpu
144    directories from your include search path when you're not building the GPU
145    backend. Defaults to 1 (build the GPU code).
146  */
147 //#define SK_SUPPORT_GPU 1
148 
149 
150 /* The PDF generation code uses Path Ops to handle complex clipping paths,
151  * but at this time, Path Ops is not release ready yet. So, the code is
152  * hidden behind this #define guard. If you are feeling adventurous and
153  * want the latest and greatest PDF generation code, uncomment the #define.
154  * When Path Ops is release ready, the define guards and this user config
155  * define should be removed entirely.
156  */
157 //#define SK_PDF_USE_PATHOPS_CLIPPING
158 
159 /* Skia makes use of histogram logging macros to trace the frequency of
160  * events. By default, Skia provides no-op versions of these macros.
161  * Skia consumers can provide their own definitions of these macros to
162  * integrate with their histogram collection backend.
163  */
164 //#define SK_HISTOGRAM_BOOLEAN(name, value)
165 //#define SK_HISTOGRAM_ENUMERATION(name, value, boundary_value)
166 
167 #endif
168 
169 // Android defines:
170 #ifndef SkUserConfig_Android_DEFINED
171 #define SkUserConfig_Android_DEFINED
172 #ifdef ANDROID
173     #include <utils/misc.h>
174 #endif
175 
176 #if __BYTE_ORDER == __BIG_ENDIAN
177     #define SK_CPU_BENDIAN
178     #undef  SK_CPU_LENDIAN
179 #else
180     #define SK_CPU_LENDIAN
181     #undef  SK_CPU_BENDIAN
182 #endif
183 
184 #define DCT_IFAST_SUPPORTED
185 #define GR_GL_CUSTOM_SETUP_HEADER "gl/GrGLConfig_chrome.h"
186 #define GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE 1
187 #define SKIA_DLL
188 #define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 0
189 #define SK_BUILD_FOR_ANDROID
190 #define SK_BUILD_FOR_ANDROID_FRAMEWORK
191 #define SK_CAN_USE_DLOPEN 0
192 #define SK_CODEC_DECODES_GIF
193 #define SK_CODEC_DECODES_JPEG
194 #define SK_CODEC_DECODES_PNG
195 #define SK_CODEC_DECODES_RAW
196 #define SK_CODEC_DECODES_WEBP
197 #define SK_DEFAULT_FONT_CACHE_LIMIT   (768 * 1024)
198 #define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024)
199 #define SK_EGL 1
200 #define SK_FONTHOST_FREETYPE_RUNTIME_VERSION 0x020400
201 #define SK_FORCE_DISTANCE_FIELD_TEXT 0
202 #define SK_GAMMA_APPLY_TO_A8
203 #define SK_GAMMA_CONTRAST 0.0
204 #define SK_GAMMA_EXPONENT 1.4
205 #define SK_IGNORE_ETC1_SUPPORT
206 #define SK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS
207 #define SK_INTERNAL
208 #define SK_PRINT_CODEC_MESSAGES
209 #define SK_SFNTLY_SUBSETTER "sample/chromium/font_subsetter.h"
210 #define SK_SUPPORT_GPU 1
211 #define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
212 #define SK_SUPPORT_LEGACY_DRAWFILTER
213 #define SK_SUPPORT_LEGACY_GRADIENT_DITHERING
214 #define SK_SUPPORT_LEGACY_UNBALANCED_PIXELREF_LOCKCOUNT
215 #define SK_SUPPORT_PDF 1
216 #define SK_USE_FREETYPE_EMBOLDEN
217 #define TURBO_HAS_565
218 #define TURBO_HAS_CROP
219 #define TURBO_HAS_SKIP
220 
221 #endif // SkUserConfig_Android_DEFINED
222