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
This commit is contained in:
parent
50485744e1
commit
059a4c70d7
@ -300,7 +300,6 @@
|
||||
{
|
||||
'defines': [
|
||||
'SK_BUILD_FOR_ANDROID',
|
||||
'SK_BUILD_FOR_ANDROID_NDK',
|
||||
],
|
||||
'configurations': {
|
||||
'Debug': {
|
||||
|
@ -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)
|
||||
|
@ -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 <stdint.h>
|
||||
|
||||
@ -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
|
||||
|
||||
|
@ -885,7 +885,7 @@ size_t SkFontHost::GetFileName(SkFontID fontID, char path[], size_t length,
|
||||
}
|
||||
|
||||
SkFontID SkFontHost::NextLogicalFont(SkFontID currFontID, SkFontID origFontID) {
|
||||
#ifdef SK_BUILD_FOR_ANDROID_NDK
|
||||
#if defined(SK_BUILD_FOR_ANDROID) && !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK)
|
||||
// Skia does not support font fallback for ndk applications in order to
|
||||
// enable clients such as WebKit to customize their font selection.
|
||||
// Clients can use GetFallbackFamilyNameForChar() to get the fallback
|
||||
|
Loading…
Reference in New Issue
Block a user