diff options
author | thestig <thestig@chromium.org> | 2014-08-26 23:34:05 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-27 06:35:31 +0000 |
commit | 55234498566db7ff749af32df42eafce48d2837c (patch) | |
tree | b8c4b4d5b4fbc7204c71abb27ae2e3167f179059 /skia | |
parent | 17e71b798adba6be1c3c96df6f891e730e8a89f9 (diff) | |
download | chromium_src-55234498566db7ff749af32df42eafce48d2837c.zip chromium_src-55234498566db7ff749af32df42eafce48d2837c.tar.gz chromium_src-55234498566db7ff749af32df42eafce48d2837c.tar.bz2 |
Revert of Cleanup: Remove unneeded SSE2 checks and unused code. (patchset #4 of https://codereview.chromium.org/459603003/)
Reason for revert:
Passed the win x64 trybot, but failed on the win 64 builder.
Original issue's description:
> Cleanup: Remove unneeded SSE2 checks and unused code.
>
> BUG=349320
>
> Committed: https://chromium.googlesource.com/chromium/src/+/b2cd99b39c3744f61231f8818f6c7a3d2881f0f0
TBR=cpu@chromium.org,dalecurtis@chromium.org,senorblanco@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=349320
Review URL: https://codereview.chromium.org/513663002
Cr-Commit-Position: refs/heads/master@{#292101}
Diffstat (limited to 'skia')
-rw-r--r-- | skia/ext/convolver.cc | 11 | ||||
-rw-r--r-- | skia/ext/convolver.h | 1 |
2 files changed, 8 insertions, 4 deletions
diff --git a/skia/ext/convolver.cc b/skia/ext/convolver.cc index 092fefa..4b40ffd 100644 --- a/skia/ext/convolver.cc +++ b/skia/ext/convolver.cc @@ -362,10 +362,13 @@ struct ConvolveProcs { void SetupSIMD(ConvolveProcs *procs) { #ifdef SIMD_SSE2 - procs->extra_horizontal_reads = 3; - procs->convolve_vertically = &ConvolveVertically_SSE2; - procs->convolve_4rows_horizontally = &Convolve4RowsHorizontally_SSE2; - procs->convolve_horizontally = &ConvolveHorizontally_SSE2; + base::CPU cpu; + if (cpu.has_sse2()) { + procs->extra_horizontal_reads = 3; + procs->convolve_vertically = &ConvolveVertically_SSE2; + procs->convolve_4rows_horizontally = &Convolve4RowsHorizontally_SSE2; + procs->convolve_horizontally = &ConvolveHorizontally_SSE2; + } #elif defined SIMD_MIPS_DSPR2 procs->extra_horizontal_reads = 3; procs->convolve_vertically = &ConvolveVertically_mips_dspr2; diff --git a/skia/ext/convolver.h b/skia/ext/convolver.h index ace8c21..dd99a72 100644 --- a/skia/ext/convolver.h +++ b/skia/ext/convolver.h @@ -9,6 +9,7 @@ #include <vector> #include "base/basictypes.h" +#include "base/cpu.h" #include "third_party/skia/include/core/SkSize.h" #include "third_party/skia/include/core/SkTypes.h" |