gfx/skia/trunk/include/config/SkUserConfig.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/skia/trunk/include/config/SkUserConfig.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,210 @@
     1.4 +
     1.5 +/*
     1.6 + * Copyright 2006 The Android Open Source Project
     1.7 + *
     1.8 + * Use of this source code is governed by a BSD-style license that can be
     1.9 + * found in the LICENSE file.
    1.10 + */
    1.11 +
    1.12 +
    1.13 +#ifndef SkUserConfig_DEFINED
    1.14 +#define SkUserConfig_DEFINED
    1.15 +
    1.16 +/*  SkTypes.h, the root of the public header files, does the following trick:
    1.17 +
    1.18 +    #include "SkPreConfig.h"
    1.19 +    #include "SkUserConfig.h"
    1.20 +    #include "SkPostConfig.h"
    1.21 +
    1.22 +    SkPreConfig.h runs first, and it is responsible for initializing certain
    1.23 +    skia defines.
    1.24 +
    1.25 +    SkPostConfig.h runs last, and its job is to just check that the final
    1.26 +    defines are consistent (i.e. that we don't have mutually conflicting
    1.27 +    defines).
    1.28 +
    1.29 +    SkUserConfig.h (this file) runs in the middle. It gets to change or augment
    1.30 +    the list of flags initially set in preconfig, and then postconfig checks
    1.31 +    that everything still makes sense.
    1.32 +
    1.33 +    Below are optional defines that add, subtract, or change default behavior
    1.34 +    in Skia. Your port can locally edit this file to enable/disable flags as
    1.35 +    you choose, or these can be delared on your command line (i.e. -Dfoo).
    1.36 +
    1.37 +    By default, this include file will always default to having all of the flags
    1.38 +    commented out, so including it will have no effect.
    1.39 +*/
    1.40 +
    1.41 +///////////////////////////////////////////////////////////////////////////////
    1.42 +
    1.43 +/*  Skia has lots of debug-only code. Often this is just null checks or other
    1.44 +    parameter checking, but sometimes it can be quite intrusive (e.g. check that
    1.45 +    each 32bit pixel is in premultiplied form). This code can be very useful
    1.46 +    during development, but will slow things down in a shipping product.
    1.47 +
    1.48 +    By default, these mutually exclusive flags are defined in SkPreConfig.h,
    1.49 +    based on the presence or absence of NDEBUG, but that decision can be changed
    1.50 +    here.
    1.51 + */
    1.52 +//#define SK_DEBUG
    1.53 +//#define SK_RELEASE
    1.54 +
    1.55 +/*  Skia has certain debug-only code that is extremely intensive even for debug
    1.56 +    builds.  This code is useful for diagnosing specific issues, but is not
    1.57 +    generally applicable, therefore it must be explicitly enabled to avoid
    1.58 +    the performance impact. By default these flags are undefined, but can be
    1.59 +    enabled by uncommenting them below.
    1.60 + */
    1.61 +//#define SK_DEBUG_GLYPH_CACHE
    1.62 +//#define SK_DEBUG_PATH
    1.63 +
    1.64 +/*  To assist debugging, Skia provides an instance counting utility in
    1.65 +    include/core/SkInstCount.h. This flag turns on and off that utility to
    1.66 +    allow instance count tracking in either debug or release builds. By
    1.67 +    default it is enabled in debug but disabled in release.
    1.68 + */
    1.69 +#define SK_ENABLE_INST_COUNT 0
    1.70 +
    1.71 +/*  If, in debugging mode, Skia needs to stop (presumably to invoke a debugger)
    1.72 +    it will call SK_CRASH(). If this is not defined it, it is defined in
    1.73 +    SkPostConfig.h to write to an illegal address
    1.74 + */
    1.75 +//#define SK_CRASH() *(int *)(uintptr_t)0 = 0
    1.76 +
    1.77 +
    1.78 +/*  preconfig will have attempted to determine the endianness of the system,
    1.79 +    but you can change these mutually exclusive flags here.
    1.80 + */
    1.81 +//#define SK_CPU_BENDIAN
    1.82 +//#define SK_CPU_LENDIAN
    1.83 +
    1.84 +/*  Most compilers use the same bit endianness for bit flags in a byte as the
    1.85 +    system byte endianness, and this is the default. If for some reason this
    1.86 +    needs to be overridden, specify which of the mutually exclusive flags to
    1.87 +    use. For example, some atom processors in certain configurations have big
    1.88 +    endian byte order but little endian bit orders.
    1.89 +*/
    1.90 +//#define SK_UINT8_BITFIELD_BENDIAN
    1.91 +//#define SK_UINT8_BITFIELD_LENDIAN
    1.92 +
    1.93 +
    1.94 +/*  To write debug messages to a console, skia will call SkDebugf(...) following
    1.95 +    printf conventions (e.g. const char* format, ...). If you want to redirect
    1.96 +    this to something other than printf, define yours here
    1.97 + */
    1.98 +//#define SkDebugf(...)  MyFunction(__VA_ARGS__)
    1.99 +
   1.100 +/*
   1.101 + *  To specify a different default font cache limit, define this. If this is
   1.102 + *  undefined, skia will use a built-in value.
   1.103 + */
   1.104 +//#define SK_DEFAULT_FONT_CACHE_LIMIT   (1024 * 1024)
   1.105 +
   1.106 +/*
   1.107 + *  To specify the default size of the image cache, undefine this and set it to
   1.108 + *  the desired value (in bytes). SkGraphics.h as a runtime API to set this
   1.109 + *  value as well. If this is undefined, a built-in value will be used.
   1.110 + */
   1.111 +//#define SK_DEFAULT_IMAGE_CACHE_LIMIT (1024 * 1024)
   1.112 +
   1.113 +/*  If zlib is available and you want to support the flate compression
   1.114 +    algorithm (used in PDF generation), define SK_ZLIB_INCLUDE to be the
   1.115 +    include path. Alternatively, define SK_SYSTEM_ZLIB to use the system zlib
   1.116 +    library specified as "#include <zlib.h>".
   1.117 + */
   1.118 +//#define SK_ZLIB_INCLUDE <zlib.h>
   1.119 +//#define SK_SYSTEM_ZLIB
   1.120 +
   1.121 +/*  Define this to allow PDF scalars above 32k.  The PDF/A spec doesn't allow
   1.122 +    them, but modern PDF interpreters should handle them just fine.
   1.123 + */
   1.124 +//#define SK_ALLOW_LARGE_PDF_SCALARS
   1.125 +
   1.126 +/*  Define this to provide font subsetter in PDF generation.
   1.127 + */
   1.128 +//#define SK_SFNTLY_SUBSETTER "sfntly/subsetter/font_subsetter.h"
   1.129 +
   1.130 +/*  Define this to set the upper limit for text to support LCD. Values that
   1.131 +    are very large increase the cost in the font cache and draw slower, without
   1.132 +    improving readability. If this is undefined, Skia will use its default
   1.133 +    value (e.g. 48)
   1.134 + */
   1.135 +//#define SK_MAX_SIZE_FOR_LCDTEXT     48
   1.136 +
   1.137 +/*  If SK_DEBUG is defined, then you can optionally define SK_SUPPORT_UNITTEST
   1.138 +    which will run additional self-tests at startup. These can take a long time,
   1.139 +    so this flag is optional.
   1.140 + */
   1.141 +#ifdef SK_DEBUG
   1.142 +//#define SK_SUPPORT_UNITTEST
   1.143 +#endif
   1.144 +
   1.145 +/* If your system embeds skia and has complex event logging, define this
   1.146 +   symbol to name a file that maps the following macros to your system's
   1.147 +   equivalents:
   1.148 +       SK_TRACE_EVENT0(event)
   1.149 +       SK_TRACE_EVENT1(event, name1, value1)
   1.150 +       SK_TRACE_EVENT2(event, name1, value1, name2, value2)
   1.151 +   src/utils/SkDebugTrace.h has a trivial implementation that writes to
   1.152 +   the debug output stream. If SK_USER_TRACE_INCLUDE_FILE is not defined,
   1.153 +   SkTrace.h will define the above three macros to do nothing.
   1.154 +*/
   1.155 +//#undef SK_USER_TRACE_INCLUDE_FILE
   1.156 +
   1.157 +/*  Change the ordering to work in X windows.
   1.158 + */
   1.159 +#ifdef SK_SAMPLES_FOR_X
   1.160 +        #define SK_R32_SHIFT    16
   1.161 +        #define SK_G32_SHIFT    8
   1.162 +        #define SK_B32_SHIFT    0
   1.163 +        #define SK_A32_SHIFT    24
   1.164 +#endif
   1.165 +
   1.166 +
   1.167 +/* Determines whether to build code that supports the GPU backend. Some classes
   1.168 +   that are not GPU-specific, such as SkShader subclasses, have optional code
   1.169 +   that is used allows them to interact with the GPU backend. If you'd like to
   1.170 +   omit this code set SK_SUPPORT_GPU to 0. This also allows you to omit the gpu
   1.171 +   directories from your include search path when you're not building the GPU
   1.172 +   backend. Defaults to 1 (build the GPU code).
   1.173 + */
   1.174 +//#define SK_SUPPORT_GPU 1
   1.175 +
   1.176 +
   1.177 +/* The PDF generation code uses Path Ops to generate inverse fills and complex
   1.178 + * clipping paths, but at this time, Path Ops is not release ready yet. So,
   1.179 + * the code is hidden behind this #define guard. If you are feeling adventurous
   1.180 + * and want the latest and greatest PDF generation code, uncomment the #define.
   1.181 + * When Path Ops is release ready, the define guards and this user config
   1.182 + * define should be removed entirely.
   1.183 + */
   1.184 +//#define SK_PDF_USE_PATHOPS
   1.185 +
   1.186 +/* Skia uses these defines as the target of include preprocessor directives.
   1.187 + * The header files pointed to by these defines provide declarations and
   1.188 + * possibly inline implementations of threading primitives.
   1.189 + *
   1.190 + * See SkThread.h for documentation on what these includes must contain.
   1.191 + */
   1.192 +//#define SK_ATOMICS_PLATFORM_H "SkAtomics_xxx.h"
   1.193 +//#define SK_MUTEX_PLATFORM_H "SkMutex_xxx.h"
   1.194 +#  if defined(_MSC_VER)
   1.195 +#    define SK_ATOMICS_PLATFORM_H "skia/SkAtomics_win.h"
   1.196 +#  elif defined(SK_BUILD_FOR_ANDROID_FRAMEWORK)
   1.197 +#    define SK_ATOMICS_PLATFORM_H "skia/SkAtomics_android.h"
   1.198 +#  else
   1.199 +#    define SK_ATOMICS_PLATFORM_H "skia/SkAtomics_sync.h"
   1.200 +#  endif
   1.201 +
   1.202 +#  if defined(SK_BUILD_FOR_WIN32)
   1.203 +#    define SK_MUTEX_PLATFORM_H "skia/SkMutex_win.h"
   1.204 +#  else
   1.205 +#    define SK_MUTEX_PLATFORM_H "skia/SkMutex_pthread.h"
   1.206 +#  endif
   1.207 +#endif
   1.208 +
   1.209 +#define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 0
   1.210 +
   1.211 +#define SK_SUPPORT_LEGACY_LAYERRASTERIZER_API 1
   1.212 +#define SK_SUPPORT_LEGACY_COMPATIBLEDEVICE_CONFIG 1
   1.213 +#define SK_SUPPORT_LEGACY_GETTOTALCLIP 1

mercurial