From 059a4c70d7eb6556c123e529259aaffe7214164d Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Wed, 13 Mar 2013 12:48:26 +0000 Subject: refactor android defines to implicitly assume NDK compliance unless it is explicitly marked as being specific to the android framework. Author: djsollen@google.com Reviewed By: reed@google.com,borenet@google.com Review URL: https://chromiumcodereview.appspot.com/12739007 git-svn-id: http://skia.googlecode.com/svn/trunk@8124 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/core/SkPreConfig.h | 15 +++++++-------- include/core/SkThread_platform.h | 6 +++--- 2 files changed, 10 insertions(+), 11 deletions(-) (limited to 'include/core') diff --git a/include/core/SkPreConfig.h b/include/core/SkPreConfig.h index 4f977ead9a..23b5694421 100644 --- a/include/core/SkPreConfig.h +++ b/include/core/SkPreConfig.h @@ -16,7 +16,7 @@ ////////////////////////////////////////////////////////////////////// -#if !defined(SK_BUILD_FOR_ANDROID) && !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_UNIX) && !defined(SK_BUILD_FOR_MAC) && !defined(SK_BUILD_FOR_SDL) && !defined(SK_BUILD_FOR_BREW) && !defined(SK_BUILD_FOR_NACL) +#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_BUILD_FOR_SDL) && !defined(SK_BUILD_FOR_BREW) && !defined(SK_BUILD_FOR_NACL) #ifdef __APPLE__ #include "TargetConditionals.h" @@ -30,8 +30,6 @@ #define SK_BUILD_FOR_WIN32 #elif defined(__SYMBIAN32__) #define SK_BUILD_FOR_WIN32 - #elif defined(ANDROID_NDK) - #define SK_BUILD_FOR_ANDROID_NDK #elif defined(ANDROID) #define SK_BUILD_FOR_ANDROID #elif defined(linux) || defined(__FreeBSD__) || defined(__OpenBSD__) || \ @@ -46,15 +44,16 @@ #endif -/* Even if the user only defined the NDK variant we still need to build - * the default Android code. Therefore, when attempting to include/exclude - * something from the NDK variant check first that we are building for - * Android then check the status of the NDK define. +/* Even if the user only defined the framework variant we still need to build + * the default (NDK-compliant) Android code. Therefore, when attempting to + * include/exclude something from the framework variant check first that we are + * building for Android then check the status of the framework define. */ -#if defined(SK_BUILD_FOR_ANDROID_NDK) && !defined(SK_BUILD_FOR_ANDROID) +#if defined(SK_BUILD_FOR_ANDROID_FRAMEWORK)) && !defined(SK_BUILD_FOR_ANDROID) #define SK_BUILD_FOR_ANDROID #endif + // USE_CHROMIUM_SKIA is defined when building Skia for the Chromium // browser. #if defined(USE_CHROMIUM_SKIA) diff --git a/include/core/SkThread_platform.h b/include/core/SkThread_platform.h index 298e9cb16a..faad402086 100644 --- a/include/core/SkThread_platform.h +++ b/include/core/SkThread_platform.h @@ -12,7 +12,7 @@ #if defined(SK_BUILD_FOR_ANDROID) -#if defined(SK_BUILD_FOR_ANDROID_NDK) +#if !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) #include @@ -51,7 +51,7 @@ static inline __attribute__((always_inline)) int32_t sk_atomic_conditional_inc(i } static inline __attribute__((always_inline)) void sk_membar_aquire__after_atomic_conditional_inc() { } -#else // !SK_BUILD_FOR_ANDROID_NDK +#else // SK_BUILD_FOR_ANDROID_FRAMEWORK /* The platform atomics operations are slightly more efficient than the * GCC built-ins, so use them. @@ -86,7 +86,7 @@ static inline __attribute__((always_inline)) void sk_membar_aquire__after_atomic //android_atomic_aquire_store(0, &dummy); } -#endif // !SK_BUILD_FOR_ANDROID_NDK +#endif // SK_BUILD_FOR_ANDROID_FRAMEWORK #else // !SK_BUILD_FOR_ANDROID -- cgit v1.2.3