diff options
author | 2015-03-20 09:25:26 -0700 | |
---|---|---|
committer | 2015-03-20 09:25:26 -0700 | |
commit | b79ff56de23fef680ae7187040f2d6a9516b553d (patch) | |
tree | ecd0d00d5619b3b98abe0cfe8264d1da9ca6980f /include/core/SkPreConfig.h | |
parent | 70840cbd898df67f603987213164c798415d76bf (diff) |
Specialize Sk2d for ARM64
The implementation is nearly identical to Sk2f, with these changes:
- float32x2_t -> float64x2_t
- vfoo -> vfooq
- one extra Newton's method step in sqrt().
Also, generally fix NEON detection to be defined(SK_ARM_HAS_NEON).
SK_ARM_HAS_NEON is not being set on ARM64 bots right now (nor does the compiler
seem to set __ARM_NEON__), so this CL fixes everything up.
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/e57b5cab261a243dcbefa74c91c896c28959bf09
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.7-Clang-Arm7-Debug-iOS-Trybot,Build-Ubuntu-GCC-Arm64-Release-Android-Trybot
Review URL: https://codereview.chromium.org/1020963002
Diffstat (limited to 'include/core/SkPreConfig.h')
-rw-r--r-- | include/core/SkPreConfig.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/core/SkPreConfig.h b/include/core/SkPreConfig.h index c7331113dc..d45c208410 100644 --- a/include/core/SkPreConfig.h +++ b/include/core/SkPreConfig.h @@ -197,6 +197,13 @@ #define SK_CPU_ARM64 #endif +// All 64-bit ARM chips have NEON. Many 32-bit ARM chips do too. +// TODO: Why don't we want NEON on iOS? +#if !defined(SK_ARM_HAS_NEON) && !defined(SK_BUILD_FOR_IOS) && \ + (defined(SK_CPU_ARM64) || defined(__ARM_NEON__)) + #define SK_ARM_HAS_NEON +#endif + ////////////////////////////////////////////////////////////////////// #if !defined(SKIA_IMPLEMENTATION) |