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 /*  To assist debugging, Skia provides an instance counting utility in
72     include/core/SkInstCount.h. This flag turns on and off that utility to
73     allow instance count tracking in either debug or release builds. By
74     default it is enabled in debug but disabled in release.
75  */
76 //#define SK_ENABLE_INST_COUNT 1
77 
78 /*  If, in debugging mode, Skia needs to stop (presumably to invoke a debugger)
79     it will call SK_CRASH(). If this is not defined it, it is defined in
80     SkPostConfig.h to write to an illegal address
81  */
82 //#define SK_CRASH() *(int *)(uintptr_t)0 = 0
83 
84 
85 /*  preconfig will have attempted to determine the endianness of the system,
86     but you can change these mutually exclusive flags here.
87  */
88 //#define SK_CPU_BENDIAN
89 //#define SK_CPU_LENDIAN
90 
91 /*  Most compilers use the same bit endianness for bit flags in a byte as the
92     system byte endianness, and this is the default. If for some reason this
93     needs to be overridden, specify which of the mutually exclusive flags to
94     use. For example, some atom processors in certain configurations have big
95     endian byte order but little endian bit orders.
96 */
97 //#define SK_UINT8_BITFIELD_BENDIAN
98 //#define SK_UINT8_BITFIELD_LENDIAN
99 
100 
101 /*  To write debug messages to a console, skia will call SkDebugf(...) following
102     printf conventions (e.g. const char* format, ...). If you want to redirect
103     this to something other than printf, define yours here
104  */
105 //#define SkDebugf(...)  MyFunction(__VA_ARGS__)
106 
107 /*
108  *  To specify a different default font cache limit, define this. If this is
109  *  undefined, skia will use a built-in value.
110  */
111 //#define SK_DEFAULT_FONT_CACHE_LIMIT   (1024 * 1024)
112 
113 /*
114  *  To specify the default size of the image cache, undefine this and set it to
115  *  the desired value (in bytes). SkGraphics.h as a runtime API to set this
116  *  value as well. If this is undefined, a built-in value will be used.
117  */
118 //#define SK_DEFAULT_IMAGE_CACHE_LIMIT (1024 * 1024)
119 
120 /*  Define this to allow PDF scalars above 32k.  The PDF/A spec doesn't allow
121     them, but modern PDF interpreters should handle them just fine.
122  */
123 //#define SK_ALLOW_LARGE_PDF_SCALARS
124 
125 /*  Define this to provide font subsetter in PDF generation.
126  */
127 //#define SK_SFNTLY_SUBSETTER "sfntly/subsetter/font_subsetter.h"
128 
129 /*  Define this to set the upper limit for text to support LCD. Values that
130     are very large increase the cost in the font cache and draw slower, without
131     improving readability. If this is undefined, Skia will use its default
132     value (e.g. 48)
133  */
134 //#define SK_MAX_SIZE_FOR_LCDTEXT     48
135 
136 /*  If SK_DEBUG is defined, then you can optionally define SK_SUPPORT_UNITTEST
137     which will run additional self-tests at startup. These can take a long time,
138     so this flag is optional.
139  */
140 #ifdef SK_DEBUG
141 //#define SK_SUPPORT_UNITTEST
142 #endif
143 
144 /*  Change the ordering to work in X windows.
145  */
146 #ifdef SK_SAMPLES_FOR_X
147         #define SK_R32_SHIFT    16
148         #define SK_G32_SHIFT    8
149         #define SK_B32_SHIFT    0
150         #define SK_A32_SHIFT    24
151 #endif
152 
153 
154 /* Determines whether to build code that supports the GPU backend. Some classes
155    that are not GPU-specific, such as SkShader subclasses, have optional code
156    that is used allows them to interact with the GPU backend. If you'd like to
157    omit this code set SK_SUPPORT_GPU to 0. This also allows you to omit the gpu
158    directories from your include search path when you're not building the GPU
159    backend. Defaults to 1 (build the GPU code).
160  */
161 //#define SK_SUPPORT_GPU 1
162 
163 
164 /* The PDF generation code uses Path Ops to handle complex clipping paths,
165  * but at this time, Path Ops is not release ready yet. So, the code is
166  * hidden behind this #define guard. If you are feeling adventurous and
167  * want the latest and greatest PDF generation code, uncomment the #define.
168  * When Path Ops is release ready, the define guards and this user config
169  * define should be removed entirely.
170  */
171 //#define SK_PDF_USE_PATHOPS_CLIPPING
172 
173 #endif
174 
175 // Android defines:
176 #ifndef SkUserConfig_Android_DEFINED
177 #define SkUserConfig_Android_DEFINED
178 #ifdef ANDROID
179     #include <utils/misc.h>
180 #endif
181 
182 #if __BYTE_ORDER == __BIG_ENDIAN
183     #define SK_CPU_BENDIAN
184     #undef  SK_CPU_LENDIAN
185 #else
186     #define SK_CPU_LENDIAN
187     #undef  SK_CPU_BENDIAN
188 #endif
189 
190 #define DCT_IFAST_SUPPORTED
191 #define GR_GL_CUSTOM_SETUP_HEADER "gl/GrGLConfig_chrome.h"
192 #define GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE 1
193 #define IGNORE_ROT_AA_RECT_OPT
194 #define SKIA_DLL
195 #define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 0
196 #define SK_BUILD_FOR_ANDROID
197 #define SK_BUILD_FOR_ANDROID_FRAMEWORK
198 #define SK_CAN_USE_DLOPEN 0
199 #define SK_DEFAULT_FONT_CACHE_LIMIT   (768 * 1024)
200 #define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024)
201 #define SK_EGL 1
202 #define SK_FONTHOST_FREETYPE_RUNTIME_VERSION 0x020400
203 #define SK_FORCE_DISTANCE_FIELD_TEXT 0
204 #define SK_GAMMA_APPLY_TO_A8
205 #define SK_GAMMA_CONTRAST 0.0
206 #define SK_GAMMA_EXPONENT 1.4
207 #define SK_IGNORE_ETC1_SUPPORT
208 #define SK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS
209 #define SK_INTERNAL
210 #define SK_PRINT_CODEC_MESSAGES
211 #define SK_SCALAR_TO_FLOAT_EXCLUDED
212 #define SK_SFNTLY_SUBSETTER "sample/chromium/font_subsetter.h"
213 #define SK_SUPPORT_GPU 1
214 #define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
215 #define SK_SUPPORT_LEGACY_GETDEVICE
216 #define SK_SUPPORT_LEGACY_PUBLIC_IMAGEINFO_FIELDS
217 #define SK_SUPPORT_LEGACY_SCALAR_DIV
218 #define SK_SUPPORT_OPENCL 0
219 #define SK_SUPPORT_PDF
220 #define SK_USE_FREETYPE_EMBOLDEN
221 
222 #endif // SkUserConfig_Android_DEFINED
223