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

Unified Diff: src/opts/opts_check_SSE2.cpp

Issue 246393013: Revert of Properly enable S32_D16_filter_DX_SSE2 optimization. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/opts_check_SSE2.cpp
diff --git a/src/opts/opts_check_SSE2.cpp b/src/opts/opts_check_SSE2.cpp
index 64a087bd61993e524f0c453f93d7eea29283eb4b..e7677220cb9326480e4fea631e2249398547e1a9 100644
--- a/src/opts/opts_check_SSE2.cpp
+++ b/src/opts/opts_check_SSE2.cpp
@@ -123,54 +123,46 @@
}
void SkBitmapProcState::platformProcs() {
- /* Every optimization in the function requires at least SSE2 */
- if (!cachedHasSSE2()) {
- return;
- }
-
- /* Check fSampleProc32 */
- if (fSampleProc32 == S32_opaque_D32_filter_DX) {
- if (cachedHasSSSE3()) {
+ if (cachedHasSSSE3()) {
+ if (fSampleProc32 == S32_opaque_D32_filter_DX) {
fSampleProc32 = S32_opaque_D32_filter_DX_SSSE3;
- } else {
+ } else if (fSampleProc32 == S32_alpha_D32_filter_DX) {
+ fSampleProc32 = S32_alpha_D32_filter_DX_SSSE3;
+ }
+
+ if (fSampleProc32 == S32_opaque_D32_filter_DXDY) {
+ fSampleProc32 = S32_opaque_D32_filter_DXDY_SSSE3;
+ } else if (fSampleProc32 == S32_alpha_D32_filter_DXDY) {
+ fSampleProc32 = S32_alpha_D32_filter_DXDY_SSSE3;
+ }
+ } else if (cachedHasSSE2()) {
+ if (fSampleProc32 == S32_opaque_D32_filter_DX) {
fSampleProc32 = S32_opaque_D32_filter_DX_SSE2;
- }
- } else if (fSampleProc32 == S32_opaque_D32_filter_DXDY) {
- if (cachedHasSSSE3()) {
- fSampleProc32 = S32_opaque_D32_filter_DXDY_SSSE3;
- }
- } else if (fSampleProc32 == S32_alpha_D32_filter_DX) {
- if (cachedHasSSSE3()) {
- fSampleProc32 = S32_alpha_D32_filter_DX_SSSE3;
- } else {
+ } else if (fSampleProc32 == S32_alpha_D32_filter_DX) {
fSampleProc32 = S32_alpha_D32_filter_DX_SSE2;
}
- } else if (fSampleProc32 == S32_alpha_D32_filter_DXDY) {
- if (cachedHasSSSE3()) {
- fSampleProc32 = S32_alpha_D32_filter_DXDY_SSSE3;
- }
- }
-
- /* Check fSampleProc16 */
- if (fSampleProc16 == S32_D16_filter_DX) {
- fSampleProc16 = S32_D16_filter_DX_SSE2;
- }
-
- /* Check fMatrixProc */
- if (fMatrixProc == ClampX_ClampY_filter_scale) {
- fMatrixProc = ClampX_ClampY_filter_scale_SSE2;
- } else if (fMatrixProc == ClampX_ClampY_nofilter_scale) {
- fMatrixProc = ClampX_ClampY_nofilter_scale_SSE2;
- } else if (fMatrixProc == ClampX_ClampY_filter_affine) {
- fMatrixProc = ClampX_ClampY_filter_affine_SSE2;
- } else if (fMatrixProc == ClampX_ClampY_nofilter_affine) {
- fMatrixProc = ClampX_ClampY_nofilter_affine_SSE2;
- }
-
- /* Check fShaderProc32 */
- if (c_hqfilter_sse) {
- if (fShaderProc32 == highQualityFilter32) {
- fShaderProc32 = highQualityFilter_SSE2;
+
+ if (fSampleProc16 == S32_D16_filter_DX) {
+ fSampleProc16 = S32_D16_filter_DX_SSE2;
+ }
+ }
+
+ if (cachedHasSSSE3() || cachedHasSSE2()) {
+ if (fMatrixProc == ClampX_ClampY_filter_scale) {
+ fMatrixProc = ClampX_ClampY_filter_scale_SSE2;
+ } else if (fMatrixProc == ClampX_ClampY_nofilter_scale) {
+ fMatrixProc = ClampX_ClampY_nofilter_scale_SSE2;
+ }
+
+ if (fMatrixProc == ClampX_ClampY_filter_affine) {
+ fMatrixProc = ClampX_ClampY_filter_affine_SSE2;
+ } else if (fMatrixProc == ClampX_ClampY_nofilter_affine) {
+ fMatrixProc = ClampX_ClampY_nofilter_affine_SSE2;
+ }
+ if (c_hqfilter_sse) {
+ if (fShaderProc32 == highQualityFilter32) {
+ fShaderProc32 = highQualityFilter_SSE2;
+ }
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698