Index: src/core/SkXfermode.cpp |
diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp |
index 9c131ca241cd4e8627e47c0c20866165e9045fa3..ba9670a9dbc1aa9222912ea672c0b8567ce65341 100644 |
--- a/src/core/SkXfermode.cpp |
+++ b/src/core/SkXfermode.cpp |
@@ -18,7 +18,16 @@ |
#include "SkUtilsArm.h" |
#include "SkWriteBuffer.h" |
-//#define SK_SUPPORT_LEGACY_SCALAR_XFERMODES |
+#ifndef SK_SUPPORT_LEGACY_SCALAR_XFERMODES |
+#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 |
+ /* |
+ * To be conservative, we only enable the new code path (using SkPMFloat) when we |
+ * "know" we're faster, which at the moment is only when we have SSE2 or better. |
+ */ |
+#else |
+ #define SK_SUPPORT_LEGACY_SCALAR_XFERMODES |
+#endif |
+#endif |
#if !SK_ARM_NEON_IS_NONE |
#include "SkXfermode_opts_arm_neon.h" |