diff options
author | 2013-01-14 14:58:22 +0000 | |
---|---|---|
committer | 2013-01-14 14:58:22 +0000 | |
commit | 47ebbcc7abf90c943b2d5e05fcedb42913e917e0 (patch) | |
tree | b519c624c82eebcdf30a10bc5f4ba90398566ff7 /include/core/SkPreConfig.h | |
parent | 61be7946ed4c351fa3f71a407243d3cd024d9924 (diff) |
Use the NDK's cpu-features library when building skia for Chromium/Android.
This patch ensures that when Skia is built for Chromium, it will
always use the Android NDK's cpu-features helper library to detect
NEON at runtime.
This is needed because sandboxed Chromium renderer processes cannot
access /proc, and the probing performed in SkUtilsArm.cpp will never
work. As such, the NEON code paths will never be used even when the
device supports them.
Chromium has special code that ensures that the browser process
passes the CPU features flags to every renderer process, but
Skia needs to use android_getCpuFeatures() to get them.
See http://crbug.com/164154 for full details.
Review URL: https://codereview.appspot.com/7102045
git-svn-id: http://skia.googlecode.com/svn/trunk@7149 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkPreConfig.h')
-rw-r--r-- | include/core/SkPreConfig.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/core/SkPreConfig.h b/include/core/SkPreConfig.h index 393a348ea8..4f977ead9a 100644 --- a/include/core/SkPreConfig.h +++ b/include/core/SkPreConfig.h @@ -55,6 +55,12 @@ #define SK_BUILD_FOR_ANDROID #endif +// USE_CHROMIUM_SKIA is defined when building Skia for the Chromium +// browser. +#if defined(USE_CHROMIUM_SKIA) + #define SK_BUILD_FOR_CHROMIUM +#endif + ////////////////////////////////////////////////////////////////////// #if !defined(SK_DEBUG) && !defined(SK_RELEASE) |