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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009 The Android Open Source Project 2 * Copyright 2009 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBitmapProcState_opts_SSE2.h" 8 #include "SkBitmapProcState_opts_SSE2.h"
9 #include "SkBitmapProcState_opts_SSSE3.h" 9 #include "SkBitmapProcState_opts_SSSE3.h"
10 #include "SkBitmapFilter_opts_SSE2.h" 10 #include "SkBitmapFilter_opts_SSE2.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 if (cachedHasSSE2()) { 116 if (cachedHasSSE2()) {
117 procs->fExtraHorizontalReads = 3; 117 procs->fExtraHorizontalReads = 3;
118 procs->fConvolveVertically = &convolveVertically_SSE2; 118 procs->fConvolveVertically = &convolveVertically_SSE2;
119 procs->fConvolve4RowsHorizontally = &convolve4RowsHorizontally_SSE2; 119 procs->fConvolve4RowsHorizontally = &convolve4RowsHorizontally_SSE2;
120 procs->fConvolveHorizontally = &convolveHorizontally_SSE2; 120 procs->fConvolveHorizontally = &convolveHorizontally_SSE2;
121 procs->fApplySIMDPadding = &applySIMDPadding_SSE2; 121 procs->fApplySIMDPadding = &applySIMDPadding_SSE2;
122 } 122 }
123 } 123 }
124 124
125 void SkBitmapProcState::platformProcs() { 125 void SkBitmapProcState::platformProcs() {
126 /* Every optimization in the function requires at least SSE2 */ 126 if (cachedHasSSSE3()) {
127 if (!cachedHasSSE2()) { 127 if (fSampleProc32 == S32_opaque_D32_filter_DX) {
128 return; 128 fSampleProc32 = S32_opaque_D32_filter_DX_SSSE3;
129 } 129 } else if (fSampleProc32 == S32_alpha_D32_filter_DX) {
130 fSampleProc32 = S32_alpha_D32_filter_DX_SSSE3;
131 }
130 132
131 /* Check fSampleProc32 */ 133 if (fSampleProc32 == S32_opaque_D32_filter_DXDY) {
132 if (fSampleProc32 == S32_opaque_D32_filter_DX) { 134 fSampleProc32 = S32_opaque_D32_filter_DXDY_SSSE3;
133 if (cachedHasSSSE3()) { 135 } else if (fSampleProc32 == S32_alpha_D32_filter_DXDY) {
134 fSampleProc32 = S32_opaque_D32_filter_DX_SSSE3; 136 fSampleProc32 = S32_alpha_D32_filter_DXDY_SSSE3;
135 } else { 137 }
138 } else if (cachedHasSSE2()) {
139 if (fSampleProc32 == S32_opaque_D32_filter_DX) {
136 fSampleProc32 = S32_opaque_D32_filter_DX_SSE2; 140 fSampleProc32 = S32_opaque_D32_filter_DX_SSE2;
137 } 141 } else if (fSampleProc32 == S32_alpha_D32_filter_DX) {
138 } else if (fSampleProc32 == S32_opaque_D32_filter_DXDY) {
139 if (cachedHasSSSE3()) {
140 fSampleProc32 = S32_opaque_D32_filter_DXDY_SSSE3;
141 }
142 } else if (fSampleProc32 == S32_alpha_D32_filter_DX) {
143 if (cachedHasSSSE3()) {
144 fSampleProc32 = S32_alpha_D32_filter_DX_SSSE3;
145 } else {
146 fSampleProc32 = S32_alpha_D32_filter_DX_SSE2; 142 fSampleProc32 = S32_alpha_D32_filter_DX_SSE2;
147 } 143 }
148 } else if (fSampleProc32 == S32_alpha_D32_filter_DXDY) { 144
149 if (cachedHasSSSE3()) { 145 if (fSampleProc16 == S32_D16_filter_DX) {
150 fSampleProc32 = S32_alpha_D32_filter_DXDY_SSSE3; 146 fSampleProc16 = S32_D16_filter_DX_SSE2;
151 } 147 }
152 } 148 }
153 149
154 /* Check fSampleProc16 */ 150 if (cachedHasSSSE3() || cachedHasSSE2()) {
155 if (fSampleProc16 == S32_D16_filter_DX) { 151 if (fMatrixProc == ClampX_ClampY_filter_scale) {
156 fSampleProc16 = S32_D16_filter_DX_SSE2; 152 fMatrixProc = ClampX_ClampY_filter_scale_SSE2;
157 } 153 } else if (fMatrixProc == ClampX_ClampY_nofilter_scale) {
154 fMatrixProc = ClampX_ClampY_nofilter_scale_SSE2;
155 }
158 156
159 /* Check fMatrixProc */ 157 if (fMatrixProc == ClampX_ClampY_filter_affine) {
160 if (fMatrixProc == ClampX_ClampY_filter_scale) { 158 fMatrixProc = ClampX_ClampY_filter_affine_SSE2;
161 fMatrixProc = ClampX_ClampY_filter_scale_SSE2; 159 } else if (fMatrixProc == ClampX_ClampY_nofilter_affine) {
162 } else if (fMatrixProc == ClampX_ClampY_nofilter_scale) { 160 fMatrixProc = ClampX_ClampY_nofilter_affine_SSE2;
163 fMatrixProc = ClampX_ClampY_nofilter_scale_SSE2; 161 }
164 } else if (fMatrixProc == ClampX_ClampY_filter_affine) { 162 if (c_hqfilter_sse) {
165 fMatrixProc = ClampX_ClampY_filter_affine_SSE2; 163 if (fShaderProc32 == highQualityFilter32) {
166 } else if (fMatrixProc == ClampX_ClampY_nofilter_affine) { 164 fShaderProc32 = highQualityFilter_SSE2;
167 fMatrixProc = ClampX_ClampY_nofilter_affine_SSE2; 165 }
168 }
169
170 /* Check fShaderProc32 */
171 if (c_hqfilter_sse) {
172 if (fShaderProc32 == highQualityFilter32) {
173 fShaderProc32 = highQualityFilter_SSE2;
174 } 166 }
175 } 167 }
176 } 168 }
177 169
178 static SkBlitRow::Proc platform_16_procs[] = { 170 static SkBlitRow::Proc platform_16_procs[] = {
179 S32_D565_Opaque_SSE2, // S32_D565_Opaque 171 S32_D565_Opaque_SSE2, // S32_D565_Opaque
180 NULL, // S32_D565_Blend 172 NULL, // S32_D565_Blend
181 S32A_D565_Opaque_SSE2, // S32A_D565_Opaque 173 S32A_D565_Opaque_SSE2, // S32A_D565_Opaque
182 NULL, // S32A_D565_Blend 174 NULL, // S32A_D565_Blend
183 S32_D565_Opaque_Dither_SSE2, // S32_D565_Opaque_Dither 175 S32_D565_Opaque_Dither_SSE2, // S32_D565_Opaque_Dither
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 } else { 331 } else {
340 return SkPlatformXfermodeFactory_impl(rec, mode); 332 return SkPlatformXfermodeFactory_impl(rec, mode);
341 } 333 }
342 } 334 }
343 335
344 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode); 336 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode);
345 337
346 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode) { 338 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode) {
347 return NULL; 339 return NULL;
348 } 340 }
OLDNEW
« 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