diff options
-rw-r--r-- | include/core/SkPreConfig.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/core/SkPreConfig.h b/include/core/SkPreConfig.h index 812e446b13..f4446c1ce3 100644 --- a/include/core/SkPreConfig.h +++ b/include/core/SkPreConfig.h @@ -103,13 +103,17 @@ ////////////////////////////////////////////////////////////////////// /** + * SK_CPU_SSE_LEVEL + * * If defined, SK_CPU_SSE_LEVEL should be set to the highest supported level. * On non-intel CPU this should be undefined. */ + #define SK_CPU_LEVEL_SSE2_VALUE 20 #define SK_CPU_LEVEL_SSE3_VALUE 30 #define SK_CPU_LEVEL_SSSE3_VALUE 31 +// Are we in GCC? #ifndef SK_CPU_SSE_LEVEL #if defined(__SSSE3__) #define SK_CPU_SSE_LEVEL SK_CPU_LEVEL_SSSE3_VALUE @@ -120,6 +124,13 @@ #endif #endif +// Are we in VisualStudio? +#ifndef SK_CPU_SSE_LEVEL + #if _M_IX86_FP == 2 + #define SK_CPU_SSE_LEVEL SK_CPU_LEVEL_SSE2_VALUE + #endif +#endif + ////////////////////////////////////////////////////////////////////// #if (defined(__arm__) && !defined(__thumb__)) || defined(SK_BUILD_FOR_WINCE) || (defined(SK_BUILD_FOR_SYMBIAN) && !defined(__MARM_THUMB__)) |