| 1 |  | 
|---|
| 2 | /* | 
|---|
| 3 | * Copyright 2006 The Android Open Source Project | 
|---|
| 4 | * | 
|---|
| 5 | * Use of this source code is governed by a BSD-style license that can be | 
|---|
| 6 | * found in the LICENSE file. | 
|---|
| 7 | */ | 
|---|
| 8 |  | 
|---|
| 9 |  | 
|---|
| 10 | #ifndef SkUserConfig_DEFINED | 
|---|
| 11 | #define SkUserConfig_DEFINED | 
|---|
| 12 |  | 
|---|
| 13 | /*  SkTypes.h, the root of the public header files, includes this file | 
|---|
| 14 | SkUserConfig.h after first initializing certain Skia defines, letting | 
|---|
| 15 | this file change or augment those flags. | 
|---|
| 16 |  | 
|---|
| 17 | Below are optional defines that add, subtract, or change default behavior | 
|---|
| 18 | in Skia. Your port can locally edit this file to enable/disable flags as | 
|---|
| 19 | you choose, or these can be delared on your command line (i.e. -Dfoo). | 
|---|
| 20 |  | 
|---|
| 21 | By default, this include file will always default to having all of the flags | 
|---|
| 22 | commented out, so including it will have no effect. | 
|---|
| 23 | */ | 
|---|
| 24 |  | 
|---|
| 25 | /////////////////////////////////////////////////////////////////////////////// | 
|---|
| 26 |  | 
|---|
| 27 | /*  Skia has lots of debug-only code. Often this is just null checks or other | 
|---|
| 28 | parameter checking, but sometimes it can be quite intrusive (e.g. check that | 
|---|
| 29 | each 32bit pixel is in premultiplied form). This code can be very useful | 
|---|
| 30 | during development, but will slow things down in a shipping product. | 
|---|
| 31 |  | 
|---|
| 32 | By default, these mutually exclusive flags are defined in SkTypes.h, | 
|---|
| 33 | based on the presence or absence of NDEBUG, but that decision can be changed | 
|---|
| 34 | here. | 
|---|
| 35 | */ | 
|---|
| 36 | //#define SK_DEBUG | 
|---|
| 37 | //#define SK_RELEASE | 
|---|
| 38 |  | 
|---|
| 39 | /*  To write debug messages to a console, skia will call SkDebugf(...) following | 
|---|
| 40 | printf conventions (e.g. const char* format, ...). If you want to redirect | 
|---|
| 41 | this to something other than printf, define yours here | 
|---|
| 42 | */ | 
|---|
| 43 | //#define SkDebugf(...)  MyFunction(__VA_ARGS__) | 
|---|
| 44 |  | 
|---|
| 45 | /* | 
|---|
| 46 | *  To specify a different default font cache limit, define this. If this is | 
|---|
| 47 | *  undefined, skia will use a built-in value. | 
|---|
| 48 | */ | 
|---|
| 49 | //#define SK_DEFAULT_FONT_CACHE_LIMIT   (1024 * 1024) | 
|---|
| 50 |  | 
|---|
| 51 | /* | 
|---|
| 52 | *  To specify the default size of the image cache, undefine this and set it to | 
|---|
| 53 | *  the desired value (in bytes). SkGraphics.h as a runtime API to set this | 
|---|
| 54 | *  value as well. If this is undefined, a built-in value will be used. | 
|---|
| 55 | */ | 
|---|
| 56 | //#define SK_DEFAULT_IMAGE_CACHE_LIMIT (1024 * 1024) | 
|---|
| 57 |  | 
|---|
| 58 | /*  Define this to set the upper limit for text to support LCD. Values that | 
|---|
| 59 | are very large increase the cost in the font cache and draw slower, without | 
|---|
| 60 | improving readability. If this is undefined, Skia will use its default | 
|---|
| 61 | value (e.g. 48) | 
|---|
| 62 | */ | 
|---|
| 63 | //#define SK_MAX_SIZE_FOR_LCDTEXT     48 | 
|---|
| 64 |  | 
|---|
| 65 | /*  Change the kN32_SkColorType ordering to BGRA to work in X windows. | 
|---|
| 66 | */ | 
|---|
| 67 | //#define SK_R32_SHIFT    16 | 
|---|
| 68 |  | 
|---|
| 69 |  | 
|---|
| 70 | /* Determines whether to build code that supports the GPU backend. Some classes | 
|---|
| 71 | that are not GPU-specific, such as SkShader subclasses, have optional code | 
|---|
| 72 | that is used allows them to interact with the GPU backend. If you'd like to | 
|---|
| 73 | omit this code set SK_SUPPORT_GPU to 0. This also allows you to omit the gpu | 
|---|
| 74 | directories from your include search path when you're not building the GPU | 
|---|
| 75 | backend. Defaults to 1 (build the GPU code). | 
|---|
| 76 | */ | 
|---|
| 77 | //#define SK_SUPPORT_GPU 1 | 
|---|
| 78 |  | 
|---|
| 79 | /* Skia makes use of histogram logging macros to trace the frequency of | 
|---|
| 80 | * events. By default, Skia provides no-op versions of these macros. | 
|---|
| 81 | * Skia consumers can provide their own definitions of these macros to | 
|---|
| 82 | * integrate with their histogram collection backend. | 
|---|
| 83 | */ | 
|---|
| 84 | //#define SK_HISTOGRAM_BOOLEAN(name, value) | 
|---|
| 85 | //#define SK_HISTOGRAM_ENUMERATION(name, value, boundary_value) | 
|---|
| 86 |  | 
|---|
| 87 | #endif | 
|---|
| 88 |  | 
|---|