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

Unified Diff: src/opts/opts_check_x86.cpp

Issue 366593004: Add SSE4 version of BlurImage optimizations. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: I have to stop optimizing gyp files... Created 6 years, 6 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/opts/SkBlurImage_opts_SSE4.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/opts_check_x86.cpp
diff --git a/src/opts/opts_check_x86.cpp b/src/opts/opts_check_x86.cpp
index 603458ba26abcddb7e6370454971572fef142a0a..5bab17aa00d137cbe92f4a004f4a66b0673c44b4 100644
--- a/src/opts/opts_check_x86.cpp
+++ b/src/opts/opts_check_x86.cpp
@@ -15,6 +15,7 @@
#include "SkBlitRow_opts_SSE2.h"
#include "SkBlitRow_opts_SSE4.h"
#include "SkBlurImage_opts_SSE2.h"
+#include "SkBlurImage_opts_SSE4.h"
#include "SkMorphology_opts.h"
#include "SkMorphology_opts_SSE2.h"
#include "SkRTConf.h"
@@ -358,10 +359,13 @@ bool SkBoxBlurGetPlatformProcs(SkBoxBlurProc* boxBlurX,
#ifdef SK_DISABLE_BLUR_DIVISION_OPTIMIZATION
return false;
#else
- if (!supports_simd(SK_CPU_SSE_LEVEL_SSE2)) {
- return false;
+ if (supports_simd(SK_CPU_SSE_LEVEL_SSE41)) {
+ return SkBoxBlurGetPlatformProcs_SSE4(boxBlurX, boxBlurY, boxBlurXY, boxBlurYX);
}
- return SkBoxBlurGetPlatformProcs_SSE2(boxBlurX, boxBlurY, boxBlurXY, boxBlurYX);
+ else if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) {
+ return SkBoxBlurGetPlatformProcs_SSE2(boxBlurX, boxBlurY, boxBlurXY, boxBlurYX);
+ }
+ return false;
#endif
}
« no previous file with comments | « src/opts/SkBlurImage_opts_SSE4.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698