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

Unified Diff: include/core/SkPreConfig.h

Issue 2002423002: [GN] Add support for disabling opts via SK_BUILD_NO_OPTS define. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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 | « gyp/common_conditions.gypi ('k') | public.bzl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPreConfig.h
diff --git a/include/core/SkPreConfig.h b/include/core/SkPreConfig.h
index b9b46c073a85736d739cb8ed4bf380789130c97f..928c1bda639379df2846aa10a7eb02110bfa734d 100644
--- a/include/core/SkPreConfig.h
+++ b/include/core/SkPreConfig.h
@@ -118,8 +118,12 @@
#define SK_CPU_SSE_LEVEL_AVX 51
#define SK_CPU_SSE_LEVEL_AVX2 52
-#ifdef SK_BUILD_FOR_IOS
- #define SK_CPU_SSE_LEVEL 0 // We're tired of fighting with opts/ and iOS simulator.
+// When targetting iOS and using gyp to generate the build files, it is not
+// possible to select files to build depending on the architecture (i.e. it
+// is not possible to use hand optimized assembly implementation). In that
+// configuration SK_BUILD_NO_OPTS is defined. Remove optimisation then.
+#ifdef SK_BUILD_NO_OPTS
+ #define SK_CPU_SSE_LEVEL 0
#endif
// Are we in GCC?
@@ -190,14 +194,12 @@
#endif
#endif
-// Disable ARM64 optimizations for iOS due to complications regarding gyp and iOS.
-#if defined(__aarch64__) && !defined(SK_BUILD_FOR_IOS)
+#if defined(__aarch64__) && !defined(SK_BUILD_NO_OPTS)
#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(__ARM_NEON__) || defined(__ARM_NEON))
+#if !defined(SK_ARM_HAS_NEON) && !defined(SK_BUILD_NO_OPTS) && (defined(__ARM_NEON__) || defined(__ARM_NEON))
#define SK_ARM_HAS_NEON
#endif
« no previous file with comments | « gyp/common_conditions.gypi ('k') | public.bzl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698