Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Unified Diff: src/core/SkUtilsArm.h

Issue 1892643003: Revert of Move CPU feature detection to its own file. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkOpts.cpp ('k') | src/core/SkUtilsArm.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkUtilsArm.h
diff --git a/src/core/SkUtilsArm.h b/src/core/SkUtilsArm.h
index dde933bafa974056c8ef9e533a491162dee5b6eb..317677115c1b4813b1a02e6e1484678c0f8faddd 100644
--- a/src/core/SkUtilsArm.h
+++ b/src/core/SkUtilsArm.h
@@ -8,7 +8,6 @@
#ifndef SkUtilsArm_DEFINED
#define SkUtilsArm_DEFINED
-#include "SkCpu.h"
#include "SkUtils.h"
// Define SK_ARM_NEON_MODE to one of the following values
@@ -38,13 +37,18 @@
// is ARMv7-A and supports Neon instructions. In DYNAMIC mode, this actually
// probes the CPU at runtime (and caches the result).
+#if SK_ARM_NEON_IS_NONE
static inline bool sk_cpu_arm_has_neon(void) {
-#if SK_ARM_NEON_IS_NONE
return false;
-#else
- return SkCpu::Supports(SkCpu::NEON);
+}
+#elif SK_ARM_NEON_IS_ALWAYS
+static inline bool sk_cpu_arm_has_neon(void) {
+ return true;
+}
+#else // SK_ARM_NEON_IS_DYNAMIC
+
+extern bool sk_cpu_arm_has_neon(void) SK_PURE_FUNC;
#endif
-}
// Use SK_ARM_NEON_WRAP(symbol) to map 'symbol' to a NEON-specific symbol
// when applicable. This will transform 'symbol' differently depending on
« no previous file with comments | « src/core/SkOpts.cpp ('k') | src/core/SkUtilsArm.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698