2011-07-28 14:26:00 +00:00
|
|
|
|
2008-12-17 15:59:43 +00:00
|
|
|
/*
|
2011-07-28 14:26:00 +00:00
|
|
|
* Copyright 2006 The Android Open Source Project
|
2008-12-17 15:59:43 +00:00
|
|
|
*
|
2011-07-28 14:26:00 +00:00
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
2008-12-17 15:59:43 +00:00
|
|
|
*/
|
|
|
|
|
2011-07-28 14:26:00 +00:00
|
|
|
|
2008-12-17 15:59:43 +00:00
|
|
|
#ifndef SkUserConfig_DEFINED
|
|
|
|
#define SkUserConfig_DEFINED
|
|
|
|
|
2009-01-08 17:49:50 +00:00
|
|
|
/* SkTypes.h, the root of the public header files, does the following trick:
|
2011-01-28 22:19:22 +00:00
|
|
|
|
2009-01-08 17:49:50 +00:00
|
|
|
#include "SkPreConfig.h"
|
|
|
|
#include "SkUserConfig.h"
|
|
|
|
#include "SkPostConfig.h"
|
2011-01-28 22:19:22 +00:00
|
|
|
|
2009-01-08 17:49:50 +00:00
|
|
|
SkPreConfig.h runs first, and it is responsible for initializing certain
|
|
|
|
skia defines.
|
2011-01-28 22:19:22 +00:00
|
|
|
|
2009-01-08 17:49:50 +00:00
|
|
|
SkPostConfig.h runs last, and its job is to just check that the final
|
|
|
|
defines are consistent (i.e. that we don't have mutually conflicting
|
|
|
|
defines).
|
2011-01-28 22:19:22 +00:00
|
|
|
|
2009-01-08 17:49:50 +00:00
|
|
|
SkUserConfig.h (this file) runs in the middle. It gets to change or augment
|
|
|
|
the list of flags initially set in preconfig, and then postconfig checks
|
|
|
|
that everything still makes sense.
|
|
|
|
|
|
|
|
Below are optional defines that add, subtract, or change default behavior
|
|
|
|
in Skia. Your port can locally edit this file to enable/disable flags as
|
|
|
|
you choose, or these can be delared on your command line (i.e. -Dfoo).
|
|
|
|
|
|
|
|
By default, this include file will always default to having all of the flags
|
|
|
|
commented out, so including it will have no effect.
|
|
|
|
*/
|
2008-12-17 15:59:43 +00:00
|
|
|
|
2009-01-08 17:49:50 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2008-12-17 15:59:43 +00:00
|
|
|
|
2009-01-08 17:49:50 +00:00
|
|
|
/* Skia has lots of debug-only code. Often this is just null checks or other
|
|
|
|
parameter checking, but sometimes it can be quite intrusive (e.g. check that
|
|
|
|
each 32bit pixel is in premultiplied form). This code can be very useful
|
|
|
|
during development, but will slow things down in a shipping product.
|
2011-01-28 22:19:22 +00:00
|
|
|
|
2009-01-08 17:49:50 +00:00
|
|
|
By default, these mutually exclusive flags are defined in SkPreConfig.h,
|
|
|
|
based on the presence or absence of NDEBUG, but that decision can be changed
|
|
|
|
here.
|
|
|
|
*/
|
|
|
|
//#define SK_DEBUG
|
|
|
|
//#define SK_RELEASE
|
2008-12-17 15:59:43 +00:00
|
|
|
|
2012-10-22 20:23:32 +00:00
|
|
|
/* Skia has certain debug-only code that is extremely intensive even for debug
|
|
|
|
builds. This code is useful for diagnosing specific issues, but is not
|
|
|
|
generally applicable, therefore it must be explicitly enabled to avoid
|
|
|
|
the performance impact. By default these flags are undefined, but can be
|
|
|
|
enabled by uncommenting them below.
|
|
|
|
*/
|
2012-11-30 16:19:32 +00:00
|
|
|
//#define SK_DEBUG_GLYPH_CACHE
|
2012-10-22 20:23:32 +00:00
|
|
|
//#define SK_DEBUG_PATH
|
|
|
|
|
2009-01-08 17:49:50 +00:00
|
|
|
/* preconfig will have attempted to determine the endianness of the system,
|
|
|
|
but you can change these mutually exclusive flags here.
|
|
|
|
*/
|
|
|
|
//#define SK_CPU_BENDIAN
|
|
|
|
//#define SK_CPU_LENDIAN
|
|
|
|
|
2012-02-02 19:15:21 +00:00
|
|
|
/* Most compilers use the same bit endianness for bit flags in a byte as the
|
|
|
|
system byte endianness, and this is the default. If for some reason this
|
|
|
|
needs to be overridden, specify which of the mutually exclusive flags to
|
|
|
|
use. For example, some atom processors in certain configurations have big
|
|
|
|
endian byte order but little endian bit orders.
|
|
|
|
*/
|
|
|
|
//#define SK_UINT8_BITFIELD_BENDIAN
|
|
|
|
//#define SK_UINT8_BITFIELD_LENDIAN
|
|
|
|
|
2013-08-15 13:43:23 +00:00
|
|
|
|
2009-01-08 17:49:50 +00:00
|
|
|
/* To write debug messages to a console, skia will call SkDebugf(...) following
|
|
|
|
printf conventions (e.g. const char* format, ...). If you want to redirect
|
|
|
|
this to something other than printf, define yours here
|
|
|
|
*/
|
|
|
|
//#define SkDebugf(...) MyFunction(__VA_ARGS__)
|
|
|
|
|
2011-11-08 13:48:32 +00:00
|
|
|
/*
|
|
|
|
* To specify a different default font cache limit, define this. If this is
|
|
|
|
* undefined, skia will use a built-in value.
|
|
|
|
*/
|
|
|
|
//#define SK_DEFAULT_FONT_CACHE_LIMIT (1024 * 1024)
|
|
|
|
|
2013-07-23 19:13:54 +00:00
|
|
|
/*
|
|
|
|
* To specify the default size of the image cache, undefine this and set it to
|
|
|
|
* the desired value (in bytes). SkGraphics.h as a runtime API to set this
|
|
|
|
* value as well. If this is undefined, a built-in value will be used.
|
|
|
|
*/
|
|
|
|
//#define SK_DEFAULT_IMAGE_CACHE_LIMIT (1024 * 1024)
|
|
|
|
|
2011-03-04 03:15:13 +00:00
|
|
|
/* Define this to allow PDF scalars above 32k. The PDF/A spec doesn't allow
|
|
|
|
them, but modern PDF interpreters should handle them just fine.
|
|
|
|
*/
|
|
|
|
//#define SK_ALLOW_LARGE_PDF_SCALARS
|
|
|
|
|
2011-07-26 02:11:41 +00:00
|
|
|
/* Define this to provide font subsetter in PDF generation.
|
|
|
|
*/
|
|
|
|
//#define SK_SFNTLY_SUBSETTER "sfntly/subsetter/font_subsetter.h"
|
|
|
|
|
2011-09-13 17:20:30 +00:00
|
|
|
/* Define this to set the upper limit for text to support LCD. Values that
|
|
|
|
are very large increase the cost in the font cache and draw slower, without
|
|
|
|
improving readability. If this is undefined, Skia will use its default
|
|
|
|
value (e.g. 48)
|
|
|
|
*/
|
|
|
|
//#define SK_MAX_SIZE_FOR_LCDTEXT 48
|
|
|
|
|
2009-01-08 17:49:50 +00:00
|
|
|
/* If SK_DEBUG is defined, then you can optionally define SK_SUPPORT_UNITTEST
|
|
|
|
which will run additional self-tests at startup. These can take a long time,
|
|
|
|
so this flag is optional.
|
|
|
|
*/
|
|
|
|
#ifdef SK_DEBUG
|
2009-10-13 13:33:16 +00:00
|
|
|
//#define SK_SUPPORT_UNITTEST
|
2008-12-17 15:59:43 +00:00
|
|
|
#endif
|
|
|
|
|
2011-03-18 21:43:03 +00:00
|
|
|
/* Change the ordering to work in X windows.
|
|
|
|
*/
|
|
|
|
#ifdef SK_SAMPLES_FOR_X
|
|
|
|
#define SK_R32_SHIFT 16
|
|
|
|
#define SK_G32_SHIFT 8
|
|
|
|
#define SK_B32_SHIFT 0
|
|
|
|
#define SK_A32_SHIFT 24
|
|
|
|
#endif
|
|
|
|
|
2012-08-02 14:03:32 +00:00
|
|
|
|
|
|
|
/* Determines whether to build code that supports the GPU backend. Some classes
|
|
|
|
that are not GPU-specific, such as SkShader subclasses, have optional code
|
|
|
|
that is used allows them to interact with the GPU backend. If you'd like to
|
|
|
|
omit this code set SK_SUPPORT_GPU to 0. This also allows you to omit the gpu
|
|
|
|
directories from your include search path when you're not building the GPU
|
|
|
|
backend. Defaults to 1 (build the GPU code).
|
|
|
|
*/
|
|
|
|
//#define SK_SUPPORT_GPU 1
|
2012-11-21 15:47:04 +00:00
|
|
|
|
2013-07-31 22:54:31 +00:00
|
|
|
|
2015-04-22 22:02:03 +00:00
|
|
|
/* The PDF generation code uses Path Ops to handle complex clipping paths,
|
|
|
|
* but at this time, Path Ops is not release ready yet. So, the code is
|
|
|
|
* hidden behind this #define guard. If you are feeling adventurous and
|
|
|
|
* want the latest and greatest PDF generation code, uncomment the #define.
|
2013-07-31 22:54:31 +00:00
|
|
|
* When Path Ops is release ready, the define guards and this user config
|
|
|
|
* define should be removed entirely.
|
|
|
|
*/
|
2015-04-22 22:02:03 +00:00
|
|
|
//#define SK_PDF_USE_PATHOPS_CLIPPING
|
2013-07-31 22:54:31 +00:00
|
|
|
|
2008-12-17 15:59:43 +00:00
|
|
|
#endif
|