Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: include/core/SkPreConfig.h

Issue 12739007: refactor android defines to implicitly assume NDK compliance unless it is explicitly marked as bein… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkPreConfig_DEFINED 10 #ifndef SkPreConfig_DEFINED
11 #define SkPreConfig_DEFINED 11 #define SkPreConfig_DEFINED
12 12
13 #ifdef WEBKIT_VERSION_MIN_REQUIRED 13 #ifdef WEBKIT_VERSION_MIN_REQUIRED
14 #include "config.h" 14 #include "config.h"
15 #endif 15 #endif
16 16
17 ////////////////////////////////////////////////////////////////////// 17 //////////////////////////////////////////////////////////////////////
18 18
19 #if !defined(SK_BUILD_FOR_ANDROID) && !defined(SK_BUILD_FOR_ANDROID_NDK) && !def ined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_PALM) && !defined(SK_BUILD_FOR_W INCE) && !defined(SK_BUILD_FOR_WIN32) && !defined(SK_BUILD_FOR_UNIX) && !defined (SK_BUILD_FOR_MAC) && !defined(SK_BUILD_FOR_SDL) && !defined(SK_BUILD_FOR_BREW) && !defined(SK_BUILD_FOR_NACL) 19 #if !defined(SK_BUILD_FOR_ANDROID) && !defined(SK_BUILD_FOR_IOS) && !defined(SK_ BUILD_FOR_PALM) && !defined(SK_BUILD_FOR_WINCE) && !defined(SK_BUILD_FOR_WIN32) && !defined(SK_BUILD_FOR_UNIX) && !defined(SK_BUILD_FOR_MAC) && !defined(SK_BUIL D_FOR_SDL) && !defined(SK_BUILD_FOR_BREW) && !defined(SK_BUILD_FOR_NACL)
20 20
21 #ifdef __APPLE__ 21 #ifdef __APPLE__
22 #include "TargetConditionals.h" 22 #include "TargetConditionals.h"
23 #endif 23 #endif
24 24
25 #if defined(PALMOS_SDK_VERSION) 25 #if defined(PALMOS_SDK_VERSION)
26 #define SK_BUILD_FOR_PALM 26 #define SK_BUILD_FOR_PALM
27 #elif defined(UNDER_CE) 27 #elif defined(UNDER_CE)
28 #define SK_BUILD_FOR_WINCE 28 #define SK_BUILD_FOR_WINCE
29 #elif defined(WIN32) 29 #elif defined(WIN32)
30 #define SK_BUILD_FOR_WIN32 30 #define SK_BUILD_FOR_WIN32
31 #elif defined(__SYMBIAN32__) 31 #elif defined(__SYMBIAN32__)
32 #define SK_BUILD_FOR_WIN32 32 #define SK_BUILD_FOR_WIN32
33 #elif defined(ANDROID_NDK)
34 #define SK_BUILD_FOR_ANDROID_NDK
35 #elif defined(ANDROID) 33 #elif defined(ANDROID)
36 #define SK_BUILD_FOR_ANDROID 34 #define SK_BUILD_FOR_ANDROID
37 #elif defined(linux) || defined(__FreeBSD__) || defined(__OpenBSD__) || \ 35 #elif defined(linux) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
38 defined(__sun) || defined(__NetBSD__) || defined(__DragonFly__) || \ 36 defined(__sun) || defined(__NetBSD__) || defined(__DragonFly__) || \
39 defined(__GLIBC__) || defined(__GNU__) 37 defined(__GLIBC__) || defined(__GNU__)
40 #define SK_BUILD_FOR_UNIX 38 #define SK_BUILD_FOR_UNIX
41 #elif TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR 39 #elif TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
42 #define SK_BUILD_FOR_IOS 40 #define SK_BUILD_FOR_IOS
43 #else 41 #else
44 #define SK_BUILD_FOR_MAC 42 #define SK_BUILD_FOR_MAC
45 #endif 43 #endif
46 44
47 #endif 45 #endif
48 46
49 /* Even if the user only defined the NDK variant we still need to build 47 /* Even if the user only defined the framework variant we still need to build
50 * the default Android code. Therefore, when attempting to include/exclude 48 * the default (NDK-compliant) Android code. Therefore, when attempting to
51 * something from the NDK variant check first that we are building for 49 * include/exclude something from the framework variant check first that we are
52 * Android then check the status of the NDK define. 50 * building for Android then check the status of the framework define.
53 */ 51 */
54 #if defined(SK_BUILD_FOR_ANDROID_NDK) && !defined(SK_BUILD_FOR_ANDROID) 52 #if defined(SK_BUILD_FOR_ANDROID_FRAMEWORK)) && !defined(SK_BUILD_FOR_ANDROID)
borenet 2013/03/13 12:08:19 Where is SK_BUILD_FOR_ANDROID_FRAMEWORK defined? I
djsollen 2013/03/13 12:26:41 It isn't defined because we aren't able to build t
borenet 2013/03/13 12:42:12 Per our live discussion, it's defined by headers i
55 #define SK_BUILD_FOR_ANDROID 53 #define SK_BUILD_FOR_ANDROID
56 #endif 54 #endif
57 55
56
58 // USE_CHROMIUM_SKIA is defined when building Skia for the Chromium 57 // USE_CHROMIUM_SKIA is defined when building Skia for the Chromium
59 // browser. 58 // browser.
60 #if defined(USE_CHROMIUM_SKIA) 59 #if defined(USE_CHROMIUM_SKIA)
61 #define SK_BUILD_FOR_CHROMIUM 60 #define SK_BUILD_FOR_CHROMIUM
62 #endif 61 #endif
63 62
64 ////////////////////////////////////////////////////////////////////// 63 //////////////////////////////////////////////////////////////////////
65 64
66 #if !defined(SK_DEBUG) && !defined(SK_RELEASE) 65 #if !defined(SK_DEBUG) && !defined(SK_RELEASE)
67 #ifdef NDEBUG 66 #ifdef NDEBUG
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 * 250 *
252 * NOTE: Clang/ARM (r161757) does not support the 'optimize' attribute. 251 * NOTE: Clang/ARM (r161757) does not support the 'optimize' attribute.
253 */ 252 */
254 #if SK_HAS_ATTRIBUTE(optimize) 253 #if SK_HAS_ATTRIBUTE(optimize)
255 # define SK_ATTRIBUTE_OPTIMIZE_O1 __attribute__((optimize("O1"))) 254 # define SK_ATTRIBUTE_OPTIMIZE_O1 __attribute__((optimize("O1")))
256 #else 255 #else
257 # define SK_ATTRIBUTE_OPTIMIZE_O1 /* nothing */ 256 # define SK_ATTRIBUTE_OPTIMIZE_O1 /* nothing */
258 #endif 257 #endif
259 258
260 #endif 259 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698