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 SkPreConfig_DEFINED
|
|
|
|
#define SkPreConfig_DEFINED
|
|
|
|
|
2010-12-20 18:26:13 +00:00
|
|
|
#ifdef WEBKIT_VERSION_MIN_REQUIRED
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2008-12-17 15:59:43 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
|
2011-02-07 20:05:49 +00:00
|
|
|
#if !defined(SK_BUILD_FOR_ANDROID_NDK) && !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_PALM) && !defined(SK_BUILD_FOR_WINCE) && !defined(SK_BUILD_FOR_WIN32) && !defined(SK_BUILD_FOR_SYMBIAN) && !defined(SK_BUILD_FOR_UNIX) && !defined(SK_BUILD_FOR_MAC) && !defined(SK_BUILD_FOR_SDL) && !defined(SK_BUILD_FOR_BREW)
|
2010-12-20 18:26:13 +00:00
|
|
|
|
|
|
|
#ifdef __APPLE__
|
|
|
|
#include "TargetConditionals.h"
|
|
|
|
#endif
|
2008-12-17 15:59:43 +00:00
|
|
|
|
|
|
|
#if defined(PALMOS_SDK_VERSION)
|
|
|
|
#define SK_BUILD_FOR_PALM
|
|
|
|
#elif defined(UNDER_CE)
|
|
|
|
#define SK_BUILD_FOR_WINCE
|
|
|
|
#elif defined(WIN32)
|
|
|
|
#define SK_BUILD_FOR_WIN32
|
|
|
|
#elif defined(__SYMBIAN32__)
|
|
|
|
#define SK_BUILD_FOR_WIN32
|
|
|
|
#elif defined(linux)
|
|
|
|
#define SK_BUILD_FOR_UNIX
|
2010-12-20 18:26:13 +00:00
|
|
|
#elif TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
|
|
|
|
#define SK_BUILD_FOR_IOS
|
|
|
|
#elif defined(ANDROID_NDK)
|
|
|
|
#define SK_BUILD_FOR_ANDROID_NDK
|
|
|
|
#elif defined(ANROID)
|
|
|
|
#define SK_BUILD_FOR_ANDROID
|
2008-12-17 15:59:43 +00:00
|
|
|
#else
|
|
|
|
#define SK_BUILD_FOR_MAC
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#if !defined(SK_DEBUG) && !defined(SK_RELEASE)
|
|
|
|
#ifdef NDEBUG
|
|
|
|
#define SK_RELEASE
|
|
|
|
#else
|
|
|
|
#define SK_DEBUG
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2009-12-16 17:25:43 +00:00
|
|
|
#ifdef SK_BUILD_FOR_WIN32
|
2011-07-12 19:19:03 +00:00
|
|
|
#if !defined(SK_RESTRICT)
|
|
|
|
#define SK_RESTRICT __restrict
|
|
|
|
#endif
|
2009-12-16 17:25:43 +00:00
|
|
|
#include "sk_stdint.h"
|
|
|
|
#endif
|
|
|
|
|
2008-12-17 15:59:43 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
|
2009-01-08 17:49:50 +00:00
|
|
|
#if !defined(SK_RESTRICT)
|
|
|
|
#define SK_RESTRICT __restrict__
|
|
|
|
#endif
|
2008-12-17 15:59:43 +00:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
|
2009-01-08 17:49:50 +00:00
|
|
|
#if !defined(SK_SCALAR_IS_FLOAT) && !defined(SK_SCALAR_IS_FIXED)
|
|
|
|
#define SK_SCALAR_IS_FLOAT
|
|
|
|
#define SK_CAN_USE_FLOAT
|
2008-12-17 15:59:43 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#if !defined(SK_CPU_BENDIAN) && !defined(SK_CPU_LENDIAN)
|
|
|
|
#if defined (__ppc__) || defined(__ppc64__)
|
|
|
|
#define SK_CPU_BENDIAN
|
|
|
|
#else
|
|
|
|
#define SK_CPU_LENDIAN
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
|
2010-01-12 22:58:35 +00:00
|
|
|
#if (defined(__arm__) && !defined(__thumb__)) || defined(SK_BUILD_FOR_WINCE) || (defined(SK_BUILD_FOR_SYMBIAN) && !defined(__MARM_THUMB__))
|
2008-12-17 15:59:43 +00:00
|
|
|
/* e.g. the ARM instructions have conditional execution, making tiny branches cheap */
|
|
|
|
#define SK_CPU_HAS_CONDITIONAL_INSTR
|
|
|
|
#endif
|
|
|
|
|
2011-03-15 21:27:08 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#if !defined(SKIA_IMPLEMENTATION)
|
|
|
|
#define SKIA_IMPLEMENTATION 0
|
|
|
|
#endif
|
2011-04-26 20:04:16 +00:00
|
|
|
|
|
|
|
#if defined(SKIA_DLL)
|
|
|
|
#if defined(WIN32)
|
|
|
|
#if SKIA_IMPLEMENTATION
|
|
|
|
#define SK_API __declspec(dllexport)
|
|
|
|
#else
|
|
|
|
#define SK_API __declspec(dllimport)
|
|
|
|
#endif
|
2011-03-15 21:27:08 +00:00
|
|
|
#else
|
2011-04-26 20:04:16 +00:00
|
|
|
#define SK_API __attribute__((visibility("default")))
|
2011-03-15 21:27:08 +00:00
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
#define SK_API
|
|
|
|
#endif
|
|
|
|
|
2008-12-17 15:59:43 +00:00
|
|
|
#endif
|
|
|
|
|