Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 | 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 | |
| 2 /* | 12 /* |
| 3 * Copyright 2006 The Android Open Source Project | 13 * Copyright 2006 The Android Open Source Project |
|
djsollen
2014/03/26 13:07:53
What branch is this file in? I'm a little lost as
scroggo
2014/03/26 15:58:39
I'm using the same trickery that I used for Androi
| |
| 4 * | 14 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 15 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 16 * found in the LICENSE file. |
| 7 */ | 17 */ |
| 8 | 18 |
| 9 | 19 |
| 10 #ifndef SkUserConfig_DEFINED | 20 #ifndef SkUserConfig_DEFINED |
| 11 #define SkUserConfig_DEFINED | 21 #define SkUserConfig_DEFINED |
| 12 | 22 |
| 13 /* SkTypes.h, the root of the public header files, does the following trick: | 23 /* SkTypes.h, the root of the public header files, does the following trick: |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 30 Below are optional defines that add, subtract, or change default behavior | 40 Below are optional defines that add, subtract, or change default behavior |
| 31 in Skia. Your port can locally edit this file to enable/disable flags as | 41 in Skia. Your port can locally edit this file to enable/disable flags as |
| 32 you choose, or these can be delared on your command line (i.e. -Dfoo). | 42 you choose, or these can be delared on your command line (i.e. -Dfoo). |
| 33 | 43 |
| 34 By default, this include file will always default to having all of the flags | 44 By default, this include file will always default to having all of the flags |
| 35 commented out, so including it will have no effect. | 45 commented out, so including it will have no effect. |
| 36 */ | 46 */ |
| 37 | 47 |
| 38 /////////////////////////////////////////////////////////////////////////////// | 48 /////////////////////////////////////////////////////////////////////////////// |
| 39 | 49 |
| 40 // | |
| 41 // ANDROID Specific changes - NO NOT CHECK BACK INTO code.google.com/p/skia | |
|
scroggo
2014/03/26 15:58:39
Note that the Android specific changes have been m
| |
| 42 // | |
| 43 | |
| 44 // When built as part of the system image we can enable certian non-NDK complian t | |
| 45 // optimizations. | |
| 46 #define SK_BUILD_FOR_ANDROID_FRAMEWORK | |
| 47 #define SK_FONTHOST_DOES_NOT_USE_FONTMGR | |
| 48 #define SK_SUPPORT_GPU 1 | |
| 49 | |
| 50 // temporary define until we can update the callers to the new convention | |
| 51 #define SK_SUPPORT_LEGACY_PIXELREF_CONSTRUCTOR | |
| 52 | |
| 53 // Android Text Tuning | |
| 54 #define SK_GAMMA_APPLY_TO_A8 | |
| 55 #define SK_GAMMA_EXPONENT 1.4 | |
| 56 #define SK_GAMMA_CONTRAST 0.0 | |
| 57 | |
| 58 // Optimizations for chromium (m30) | |
| 59 #define GR_GL_CUSTOM_SETUP_HEADER "gl/GrGLConfig_chrome.h" | |
| 60 #define IGNORE_ROT_AA_RECT_OPT | |
| 61 #define SKIA_IGNORE_GPU_MIPMAPS | |
| 62 | |
| 63 // Disable this check because it is too strict for some chromium-specific | |
| 64 // subclasses of SkPixelRef. See bug: crbug.com/171776. | |
| 65 #define SK_DISABLE_PIXELREF_LOCKCOUNT_BALANCE_CHECK | |
| 66 | |
| 67 // do this build check for other tools that still read this header | |
| 68 #ifdef ANDROID | |
| 69 #include <utils/misc.h> | |
| 70 #endif | |
| 71 | |
| 72 #define SK_USE_POSIX_THREADS | |
| 73 | |
| 74 /* Skia has lots of debug-only code. Often this is just null checks or other | 50 /* Skia has lots of debug-only code. Often this is just null checks or other |
| 75 parameter checking, but sometimes it can be quite intrusive (e.g. check that | 51 parameter checking, but sometimes it can be quite intrusive (e.g. check that |
| 76 each 32bit pixel is in premultiplied form). This code can be very useful | 52 each 32bit pixel is in premultiplied form). This code can be very useful |
| 77 during development, but will slow things down in a shipping product. | 53 during development, but will slow things down in a shipping product. |
| 78 | 54 |
| 79 By default, these mutually exclusive flags are defined in SkPreConfig.h, | 55 By default, these mutually exclusive flags are defined in SkPreConfig.h, |
| 80 based on the presence or absence of NDEBUG, but that decision can be changed | 56 based on the presence or absence of NDEBUG, but that decision can be changed |
| 81 here. | 57 here. |
| 82 */ | 58 */ |
| 83 //#define SK_DEBUG | 59 //#define SK_DEBUG |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 102 /* If, in debugging mode, Skia needs to stop (presumably to invoke a debugger) | 78 /* If, in debugging mode, Skia needs to stop (presumably to invoke a debugger) |
| 103 it will call SK_CRASH(). If this is not defined it, it is defined in | 79 it will call SK_CRASH(). If this is not defined it, it is defined in |
| 104 SkPostConfig.h to write to an illegal address | 80 SkPostConfig.h to write to an illegal address |
| 105 */ | 81 */ |
| 106 //#define SK_CRASH() *(int *)(uintptr_t)0 = 0 | 82 //#define SK_CRASH() *(int *)(uintptr_t)0 = 0 |
| 107 | 83 |
| 108 | 84 |
| 109 /* preconfig will have attempted to determine the endianness of the system, | 85 /* preconfig will have attempted to determine the endianness of the system, |
| 110 but you can change these mutually exclusive flags here. | 86 but you can change these mutually exclusive flags here. |
| 111 */ | 87 */ |
| 112 #if __BYTE_ORDER == __BIG_ENDIAN | 88 //#define SK_CPU_BENDIAN |
| 113 #define SK_CPU_BENDIAN | 89 //#define SK_CPU_LENDIAN |
| 114 #undef SK_CPU_LENDIAN | |
| 115 #else | |
| 116 #define SK_CPU_LENDIAN | |
| 117 #undef SK_CPU_BENDIAN | |
| 118 #endif | |
| 119 | 90 |
| 120 /* Most compilers use the same bit endianness for bit flags in a byte as the | 91 /* Most compilers use the same bit endianness for bit flags in a byte as the |
| 121 system byte endianness, and this is the default. If for some reason this | 92 system byte endianness, and this is the default. If for some reason this |
| 122 needs to be overridden, specify which of the mutually exclusive flags to | 93 needs to be overridden, specify which of the mutually exclusive flags to |
| 123 use. For example, some atom processors in certain configurations have big | 94 use. For example, some atom processors in certain configurations have big |
| 124 endian byte order but little endian bit orders. | 95 endian byte order but little endian bit orders. |
| 125 */ | 96 */ |
| 126 //#define SK_UINT8_BITFIELD_BENDIAN | 97 //#define SK_UINT8_BITFIELD_BENDIAN |
| 127 //#define SK_UINT8_BITFIELD_LENDIAN | 98 //#define SK_UINT8_BITFIELD_LENDIAN |
| 128 | 99 |
| 129 | 100 |
| 130 /* Some compilers don't support long long for 64bit integers. If yours does | |
| 131 not, define this to the appropriate type. | |
| 132 */ | |
| 133 #define SkLONGLONG int64_t | |
| 134 | |
| 135 | |
| 136 /* To write debug messages to a console, skia will call SkDebugf(...) following | 101 /* To write debug messages to a console, skia will call SkDebugf(...) following |
| 137 printf conventions (e.g. const char* format, ...). If you want to redirect | 102 printf conventions (e.g. const char* format, ...). If you want to redirect |
| 138 this to something other than printf, define yours here | 103 this to something other than printf, define yours here |
| 139 */ | 104 */ |
| 140 //#define SkDebugf(...) MyFunction(__VA_ARGS__) | 105 //#define SkDebugf(...) MyFunction(__VA_ARGS__) |
| 141 | 106 |
| 142 /* | 107 /* |
| 143 * To specify a different default font cache limit, define this. If this is | 108 * To specify a different default font cache limit, define this. If this is |
| 144 * undefined, skia will use a built-in value. | 109 * undefined, skia will use a built-in value. |
| 145 */ | 110 */ |
| 146 #define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024) | 111 //#define SK_DEFAULT_FONT_CACHE_LIMIT (1024 * 1024) |
| 147 | 112 |
| 148 /* | 113 /* |
| 149 * To specify the default size of the image cache, undefine this and set it to | 114 * To specify the default size of the image cache, undefine this and set it to |
| 150 * the desired value (in bytes). SkGraphics.h as a runtime API to set this | 115 * the desired value (in bytes). SkGraphics.h as a runtime API to set this |
| 151 * value as well. If this is undefined, a built-in value will be used. | 116 * value as well. If this is undefined, a built-in value will be used. |
| 152 */ | 117 */ |
| 153 //#define SK_DEFAULT_IMAGE_CACHE_LIMIT (1024 * 1024) | 118 //#define SK_DEFAULT_IMAGE_CACHE_LIMIT (1024 * 1024) |
| 154 | 119 |
| 155 /* If zlib is available and you want to support the flate compression | 120 /* If zlib is available and you want to support the flate compression |
| 156 algorithm (used in PDF generation), define SK_ZLIB_INCLUDE to be the | 121 algorithm (used in PDF generation), define SK_ZLIB_INCLUDE to be the |
| 157 include path. Alternatively, define SK_SYSTEM_ZLIB to use the system zlib | 122 include path. Alternatively, define SK_SYSTEM_ZLIB to use the system zlib |
| 158 library specified as "#include <zlib.h>". | 123 library specified as "#include <zlib.h>". |
| 159 */ | 124 */ |
| 160 //#define SK_ZLIB_INCLUDE <zlib.h> | 125 //#define SK_ZLIB_INCLUDE <zlib.h> |
| 161 //#define SK_SYSTEM_ZLIB | 126 //#define SK_SYSTEM_ZLIB |
| 162 | 127 |
| 163 /* Define this to allow PDF scalars above 32k. The PDF/A spec doesn't allow | 128 /* Define this to allow PDF scalars above 32k. The PDF/A spec doesn't allow |
| 164 them, but modern PDF interpreters should handle them just fine. | 129 them, but modern PDF interpreters should handle them just fine. |
| 165 */ | 130 */ |
| 166 //#define SK_ALLOW_LARGE_PDF_SCALARS | 131 //#define SK_ALLOW_LARGE_PDF_SCALARS |
| 167 | 132 |
| 168 /* Define this to provide font subsetter in PDF generation. | 133 /* Define this to provide font subsetter in PDF generation. |
| 169 */ | 134 */ |
| 170 #define SK_SFNTLY_SUBSETTER "sample/chromium/font_subsetter.h" | 135 //#define SK_SFNTLY_SUBSETTER "sfntly/subsetter/font_subsetter.h" |
| 171 | 136 |
| 172 /* Define this to set the upper limit for text to support LCD. Values that | 137 /* Define this to set the upper limit for text to support LCD. Values that |
| 173 are very large increase the cost in the font cache and draw slower, without | 138 are very large increase the cost in the font cache and draw slower, without |
| 174 improving readability. If this is undefined, Skia will use its default | 139 improving readability. If this is undefined, Skia will use its default |
| 175 value (e.g. 48) | 140 value (e.g. 48) |
| 176 */ | 141 */ |
| 177 //#define SK_MAX_SIZE_FOR_LCDTEXT 48 | 142 //#define SK_MAX_SIZE_FOR_LCDTEXT 48 |
| 178 | 143 |
| 179 /* If SK_DEBUG is defined, then you can optionally define SK_SUPPORT_UNITTEST | 144 /* If SK_DEBUG is defined, then you can optionally define SK_SUPPORT_UNITTEST |
| 180 which will run additional self-tests at startup. These can take a long time, | 145 which will run additional self-tests at startup. These can take a long time, |
| 181 so this flag is optional. | 146 so this flag is optional. |
| 182 */ | 147 */ |
| 183 #ifdef SK_DEBUG | 148 #ifdef SK_DEBUG |
| 184 //#define SK_SUPPORT_UNITTEST | 149 //#define SK_SUPPORT_UNITTEST |
| 185 #endif | 150 #endif |
| 186 | 151 |
| 187 /* If your system embeds skia and has complex event logging, define this | |
| 188 symbol to name a file that maps the following macros to your system's | |
| 189 equivalents: | |
| 190 SK_TRACE_EVENT0(event) | |
| 191 SK_TRACE_EVENT1(event, name1, value1) | |
| 192 SK_TRACE_EVENT2(event, name1, value1, name2, value2) | |
| 193 src/utils/SkDebugTrace.h has a trivial implementation that writes to | |
| 194 the debug output stream. If SK_USER_TRACE_INCLUDE_FILE is not defined, | |
| 195 SkTrace.h will define the above three macros to do nothing. | |
| 196 */ | |
| 197 //#undef SK_USER_TRACE_INCLUDE_FILE | |
| 198 | |
| 199 /* Change the ordering to work in X windows. | 152 /* Change the ordering to work in X windows. |
| 200 */ | 153 */ |
| 201 #ifdef SK_SAMPLES_FOR_X | 154 #ifdef SK_SAMPLES_FOR_X |
| 202 #define SK_R32_SHIFT 16 | 155 #define SK_R32_SHIFT 16 |
| 203 #define SK_G32_SHIFT 8 | 156 #define SK_G32_SHIFT 8 |
| 204 #define SK_B32_SHIFT 0 | 157 #define SK_B32_SHIFT 0 |
| 205 #define SK_A32_SHIFT 24 | 158 #define SK_A32_SHIFT 24 |
| 206 #endif | 159 #endif |
| 207 | 160 |
| 208 | 161 |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 224 * define should be removed entirely. | 177 * define should be removed entirely. |
| 225 */ | 178 */ |
| 226 //#define SK_PDF_USE_PATHOPS | 179 //#define SK_PDF_USE_PATHOPS |
| 227 | 180 |
| 228 /* Skia uses these defines as the target of include preprocessor directives. | 181 /* Skia uses these defines as the target of include preprocessor directives. |
| 229 * The header files pointed to by these defines provide declarations and | 182 * The header files pointed to by these defines provide declarations and |
| 230 * possibly inline implementations of threading primitives. | 183 * possibly inline implementations of threading primitives. |
| 231 * | 184 * |
| 232 * See SkThread.h for documentation on what these includes must contain. | 185 * See SkThread.h for documentation on what these includes must contain. |
| 233 */ | 186 */ |
| 187 //#define SK_ATOMICS_PLATFORM_H "SkAtomics_xxx.h" | |
| 188 //#define SK_MUTEX_PLATFORM_H "SkMutex_xxx.h" | |
| 189 | |
| 190 #endif | |
| 191 | |
| 192 // Android defines: | |
| 193 #ifndef SkUserConfig_Android_DEFINED | |
| 194 #define SkUserConfig_Android_DEFINED | |
| 195 #ifdef ANDROID | |
| 196 #include <utils/misc.h> | |
| 197 #endif | |
| 198 | |
| 199 #if __BYTE_ORDER == __BIG_ENDIAN | |
| 200 #define SK_CPU_BENDIAN | |
| 201 #undef SK_CPU_LENDIAN | |
| 202 #else | |
| 203 #define SK_CPU_LENDIAN | |
| 204 #undef SK_CPU_BENDIAN | |
| 205 #endif | |
| 206 | |
| 207 #define SK_GAMMA_SRGB | |
| 208 #define SK_GAMMA_APPLY_TO_A8 | |
| 209 #define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 0 | |
| 210 #define SK_SUPPORT_GPU 1 | |
| 211 #define SK_SUPPORT_OPENCL 0 | |
| 212 #define SK_FORCE_DISTANCEFIELD_FONTS 0 | |
| 213 #define SK_SCALAR_IS_FLOAT | |
| 214 #define SK_CAN_USE_FLOAT | |
| 215 #define DCT_IFAST_SUPPORTED | |
| 216 #define SK_USE_FREETYPE_EMBOLDEN | |
| 217 #define SK_FONTHOST_FREETYPE_RUNTIME_VERSION 0x020400 | |
| 218 #define SK_CAN_USE_DLOPEN 0 | |
| 219 #define SK_SFNTLY_SUBSETTER "sample/chromium/font_subsetter.h" | |
| 220 #define SK_BUILD_FOR_ANDROID_FRAMEWORK | |
| 221 #define SK_GAMMA_EXPONENT 1.4 | |
| 222 #define SK_GAMMA_CONTRAST 0.0 | |
| 223 #define GR_GL_CUSTOM_SETUP_HEADER "gl/GrGLConfig_chrome.h" | |
| 224 #define IGNORE_ROT_AA_RECT_OPT | |
| 225 #define SK_DISABLE_PIXELREF_LOCKCOUNT_BALANCE_CHECK | |
| 226 #define SkLONGLONG int64_t | |
| 227 #define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024) | |
| 234 #define SK_ATOMICS_PLATFORM_H "../../src/ports/SkAtomics_android.h" | 228 #define SK_ATOMICS_PLATFORM_H "../../src/ports/SkAtomics_android.h" |
| 235 #define SK_MUTEX_PLATFORM_H "../../src/ports/SkMutex_pthread.h" | 229 #define SK_MUTEX_PLATFORM_H "../../src/ports/SkMutex_pthread.h" |
| 230 #define SK_BUILD_FOR_ANDROID | |
| 231 #define SK_FONTHOST_DOES_NOT_USE_FONTMGR | |
| 232 #define SK_USE_POSIX_THREADS | |
| 233 #define SK_FONTHOST_FREETYPE_RUNTIME_VERSION 0x020400 | |
| 234 #define SK_CAN_USE_DLOPEN 0 | |
| 235 #define SK_SUPPORT_PDF | |
| 236 | 236 |
| 237 #define SK_SCALAR_IS_FLOAT | 237 #endif // SkUserConfig_Android_DEFINED |
| 238 | |
| 239 #endif | |
| OLD | NEW |