diff options
author | mtklein <mtklein@chromium.org> | 2016-09-08 06:59:44 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-08 06:59:44 -0700 |
commit | da7136750d30f5f8a38808414e0f67f3382edacf (patch) | |
tree | 1da767a40cf686bfbf09a6e908e50aa75f25d46a | |
parent | 2172d55eb5c76d0e9f15cf7faa72014c8f49209b (diff) |
Flesh out SkOpts namespaces.
This makes it easier to see the baseline CPU feature settings for a build when looking at a stack trace or profile. This fills out all the features we currently
might care about.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2318313003
Review-Url: https://codereview.chromium.org/2318313003
-rw-r--r-- | src/core/SkOpts.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/core/SkOpts.cpp b/src/core/SkOpts.cpp index 95781a3977..879eefcde1 100644 --- a/src/core/SkOpts.cpp +++ b/src/core/SkOpts.cpp @@ -11,13 +11,27 @@ #include "SkOpts.h" #if defined(SK_ARM_HAS_NEON) - #define SK_OPTS_NS neon + #if defined(__ARM_FEATURE_CRC32) + #define SK_OPTS_NS neon_and_crc32 + #else + #define SK_OPTS_NS neon + #endif +#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_AVX2 + #define SK_OPTS_NS avx2 +#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_AVX + #define SK_OPTS_NS avx +#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE42 + #define SK_OPTS_NS sse42 +#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE41 + #define SK_OPTS_NS sse41 #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSSE3 #define SK_OPTS_NS ssse3 #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE3 #define SK_OPTS_NS sse3 #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 #define SK_OPTS_NS sse2 +#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1 + #define SK_OPTS_NS sse #else #define SK_OPTS_NS portable #endif |