Index: src/opts/opts_check_SSE2.cpp |
diff --git a/src/opts/opts_check_SSE2.cpp b/src/opts/opts_check_SSE2.cpp |
index d23e3844d526c424b4135293e6c100fba976bcb2..37ce9036ca40267e9bc4c98572295b3dc57239b5 100644 |
--- a/src/opts/opts_check_SSE2.cpp |
+++ b/src/opts/opts_check_SSE2.cpp |
@@ -7,6 +7,7 @@ |
#include "SkBitmapProcState_opts_SSE2.h" |
#include "SkBitmapProcState_opts_SSSE3.h" |
+#include "SkBitmapFilter_opts_SSE2.h" |
#include "SkBlitMask.h" |
#include "SkBlitRow.h" |
#include "SkBlitRect_opts_SSE2.h" |
@@ -14,6 +15,8 @@ |
#include "SkUtils_opts_SSE2.h" |
#include "SkUtils.h" |
+#include "SkRTConf.h" |
+ |
#if defined(_MSC_VER) && defined(_WIN64) |
#include <intrin.h> |
#endif |
@@ -102,6 +105,8 @@ static bool cachedHasSSSE3() { |
return gHasSSSE3; |
} |
+SK_CONF_DECLARE( bool, c_hqfilter_sse, "bitmap.filter.highQualitySSE", false, "Use SSE optimized version of high quality image filters"); |
+ |
void SkBitmapProcState::platformProcs() { |
if (cachedHasSSSE3()) { |
#if !defined(SK_BUILD_FOR_ANDROID) |
@@ -142,6 +147,14 @@ void SkBitmapProcState::platformProcs() { |
} else if (fMatrixProc == ClampX_ClampY_nofilter_affine) { |
fMatrixProc = ClampX_ClampY_nofilter_affine_SSE2; |
} |
+ if (c_hqfilter_sse) { |
+ if (fShaderProc32 == highQualityFilter) { |
+ fShaderProc32 = highQualityFilter_SSE2; |
+ } |
+ if (fShaderProc32 == highQualityFilter_ScaleOnly) { |
+ fShaderProc32 = highQualityFilter_ScaleOnly_SSE2; |
+ } |
+ } |
} |
} |