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/*  If zlib is available and you want to support the flate compression
121    algorithm (used in PDF generation), define SK_ZLIB_INCLUDE to be the
122    include path. Alternatively, define SK_SYSTEM_ZLIB to use the system zlib
123    library specified as "#include <zlib.h>".
124 */
125//#define SK_ZLIB_INCLUDE <zlib.h>
126//#define SK_SYSTEM_ZLIB
127
128/*  Define this to allow PDF scalars above 32k.  The PDF/A spec doesn't allow
129    them, but modern PDF interpreters should handle them just fine.
130 */
131//#define SK_ALLOW_LARGE_PDF_SCALARS
132
133/*  Define this to provide font subsetter in PDF generation.
134 */
135//#define SK_SFNTLY_SUBSETTER "sfntly/subsetter/font_subsetter.h"
136
137/*  Define this to set the upper limit for text to support LCD. Values that
138    are very large increase the cost in the font cache and draw slower, without
139    improving readability. If this is undefined, Skia will use its default
140    value (e.g. 48)
141 */
142//#define SK_MAX_SIZE_FOR_LCDTEXT     48
143
144/*  If SK_DEBUG is defined, then you can optionally define SK_SUPPORT_UNITTEST
145    which will run additional self-tests at startup. These can take a long time,
146    so this flag is optional.
147 */
148#ifdef SK_DEBUG
149//#define SK_SUPPORT_UNITTEST
150#endif
151
152/*  Change the ordering to work in X windows.
153 */
154#ifdef SK_SAMPLES_FOR_X
155        #define SK_R32_SHIFT    16
156        #define SK_G32_SHIFT    8
157        #define SK_B32_SHIFT    0
158        #define SK_A32_SHIFT    24
159#endif
160
161
162/* Determines whether to build code that supports the GPU backend. Some classes
163   that are not GPU-specific, such as SkShader subclasses, have optional code
164   that is used allows them to interact with the GPU backend. If you'd like to
165   omit this code set SK_SUPPORT_GPU to 0. This also allows you to omit the gpu
166   directories from your include search path when you're not building the GPU
167   backend. Defaults to 1 (build the GPU code).
168 */
169//#define SK_SUPPORT_GPU 1
170
171
172/* The PDF generation code uses Path Ops to generate inverse fills and complex
173 * clipping paths, but at this time, Path Ops is not release ready yet. So,
174 * the code is hidden behind this #define guard. If you are feeling adventurous
175 * and want the latest and greatest PDF generation code, uncomment the #define.
176 * When Path Ops is release ready, the define guards and this user config
177 * define should be removed entirely.
178 */
179//#define SK_PDF_USE_PATHOPS
180
181/* Skia uses these defines as the target of include preprocessor directives.
182 * The header files pointed to by these defines provide declarations and
183 * possibly inline implementations of threading primitives.
184 *
185 * See SkThread.h for documentation on what these includes must contain.
186 */
187//#define SK_ATOMICS_PLATFORM_H "SkAtomics_xxx.h"
188//#define SK_MUTEX_PLATFORM_H "SkMutex_xxx.h"
189//#define SK_BARRIERS_PLATFORM_H "SkBarriers_xxx.h"
190
191#endif
192
193// Android defines:
194#ifndef SkUserConfig_Android_DEFINED
195#define SkUserConfig_Android_DEFINED
196#ifdef ANDROID
197    #include <utils/misc.h>
198#endif
199
200#if __BYTE_ORDER == __BIG_ENDIAN
201    #define SK_CPU_BENDIAN
202    #undef  SK_CPU_LENDIAN
203#else
204    #define SK_CPU_LENDIAN
205    #undef  SK_CPU_BENDIAN
206#endif
207
208#define SK_INTERNAL
209#define SK_GAMMA_APPLY_TO_A8
210#define SK_SCALAR_TO_FLOAT_EXCLUDED
211#define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 0
212#define SK_SUPPORT_GPU 1
213#define SK_SUPPORT_OPENCL 0
214#define SK_FORCE_DISTANCEFIELD_FONTS 0
215#define SK_SCALAR_IS_FLOAT
216#define DCT_IFAST_SUPPORTED
217#define SK_USE_FREETYPE_EMBOLDEN
218#define SK_SFNTLY_SUBSETTER "sample/chromium/font_subsetter.h"
219#define SK_BUILD_FOR_ANDROID_FRAMEWORK
220#define GR_GL_CUSTOM_SETUP_HEADER "gl/GrGLConfig_chrome.h"
221#define IGNORE_ROT_AA_RECT_OPT
222#define SK_DISABLE_PIXELREF_LOCKCOUNT_BALANCE_CHECK
223#define SkLONGLONG int64_t
224#define SK_DEFAULT_FONT_CACHE_LIMIT   (768 * 1024)
225#define SK_ATOMICS_PLATFORM_H "../../src/ports/SkAtomics_sync.h"
226#define SK_MUTEX_PLATFORM_H "../../src/ports/SkMutex_pthread.h"
227#define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
228#define SK_ATTR_DEPRECATED SK_NOTHING_ARG1
229#define SK_SUPPORT_LEGACY_SHADER_LOCALMATRIX
230#define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024)
231#define SK_IGNORE_ETC1_SUPPORT
232#define SK_SUPPORT_LEGACY_BITMAP_CONFIG
233#define SK_BUILD_FOR_ANDROID
234#define SK_FONTHOST_DOES_NOT_USE_FONTMGR
235#define SK_GAMMA_EXPONENT 1.4
236#define SK_GAMMA_CONTRAST 0.0
237#define SK_USE_POSIX_THREADS
238#define SK_FONTHOST_FREETYPE_RUNTIME_VERSION 0x020400
239#define SK_CAN_USE_DLOPEN 0
240#define GR_COMPRESS_ALPHA_MASK 0
241#define SK_SUPPORT_PDF
242#define SK_SUPPORT_LEGACY_SHADER_LOCALMATRIX
243
244#endif // SkUserConfig_Android_DEFINED
245