From da7136750d30f5f8a38808414e0f67f3382edacf Mon Sep 17 00:00:00 2001 From: mtklein Date: Thu, 8 Sep 2016 06:59:44 -0700 Subject: [PATCH] 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 --- src/core/SkOpts.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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