OLD | NEW |
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 "SkBitmapFilter_opts_SSE2.h" | 8 #include "SkBitmapFilter_opts_SSE2.h" |
9 #include "SkBitmapProcState_opts_SSE2.h" | 9 #include "SkBitmapProcState_opts_SSE2.h" |
10 #include "SkBitmapProcState_opts_SSSE3.h" | 10 #include "SkBitmapProcState_opts_SSSE3.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 */ | 123 */ |
124 return false; | 124 return false; |
125 #else | 125 #else |
126 return minLevel <= *gSIMDLevel.get(); | 126 return minLevel <= *gSIMDLevel.get(); |
127 #endif | 127 #endif |
128 } | 128 } |
129 } | 129 } |
130 | 130 |
131 //////////////////////////////////////////////////////////////////////////////// | 131 //////////////////////////////////////////////////////////////////////////////// |
132 | 132 |
133 SK_CONF_DECLARE( bool, c_hqfilter_sse, "bitmap.filter.highQualitySSE", true, "Us
e SSE optimized version of high quality image filters"); | |
134 | |
135 void SkBitmapScaler::PlatformConvolutionProcs(SkConvolutionProcs* procs) { | 133 void SkBitmapScaler::PlatformConvolutionProcs(SkConvolutionProcs* procs) { |
136 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) { | 134 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) { |
137 procs->fExtraHorizontalReads = 3; | 135 procs->fExtraHorizontalReads = 3; |
138 procs->fConvolveVertically = &convolveVertically_SSE2; | 136 procs->fConvolveVertically = &convolveVertically_SSE2; |
139 procs->fConvolve4RowsHorizontally = &convolve4RowsHorizontally_SSE2; | 137 procs->fConvolve4RowsHorizontally = &convolve4RowsHorizontally_SSE2; |
140 procs->fConvolveHorizontally = &convolveHorizontally_SSE2; | 138 procs->fConvolveHorizontally = &convolveHorizontally_SSE2; |
141 procs->fApplySIMDPadding = &applySIMDPadding_SSE2; | 139 procs->fApplySIMDPadding = &applySIMDPadding_SSE2; |
142 } | 140 } |
143 } | 141 } |
144 | 142 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 /* Check fMatrixProc */ | 186 /* Check fMatrixProc */ |
189 if (fMatrixProc == ClampX_ClampY_filter_scale) { | 187 if (fMatrixProc == ClampX_ClampY_filter_scale) { |
190 fMatrixProc = ClampX_ClampY_filter_scale_SSE2; | 188 fMatrixProc = ClampX_ClampY_filter_scale_SSE2; |
191 } else if (fMatrixProc == ClampX_ClampY_nofilter_scale) { | 189 } else if (fMatrixProc == ClampX_ClampY_nofilter_scale) { |
192 fMatrixProc = ClampX_ClampY_nofilter_scale_SSE2; | 190 fMatrixProc = ClampX_ClampY_nofilter_scale_SSE2; |
193 } else if (fMatrixProc == ClampX_ClampY_filter_affine) { | 191 } else if (fMatrixProc == ClampX_ClampY_filter_affine) { |
194 fMatrixProc = ClampX_ClampY_filter_affine_SSE2; | 192 fMatrixProc = ClampX_ClampY_filter_affine_SSE2; |
195 } else if (fMatrixProc == ClampX_ClampY_nofilter_affine) { | 193 } else if (fMatrixProc == ClampX_ClampY_nofilter_affine) { |
196 fMatrixProc = ClampX_ClampY_nofilter_affine_SSE2; | 194 fMatrixProc = ClampX_ClampY_nofilter_affine_SSE2; |
197 } | 195 } |
198 | |
199 /* Check fShaderProc32 */ | |
200 if (c_hqfilter_sse) { | |
201 if (fShaderProc32 == highQualityFilter32) { | |
202 fShaderProc32 = highQualityFilter_SSE2; | |
203 } | |
204 } | |
205 } | 196 } |
206 | 197 |
207 //////////////////////////////////////////////////////////////////////////////// | 198 //////////////////////////////////////////////////////////////////////////////// |
208 | 199 |
209 static SkBlitRow::Proc16 platform_16_procs[] = { | 200 static SkBlitRow::Proc16 platform_16_procs[] = { |
210 S32_D565_Opaque_SSE2, // S32_D565_Opaque | 201 S32_D565_Opaque_SSE2, // S32_D565_Opaque |
211 NULL, // S32_D565_Blend | 202 NULL, // S32_D565_Blend |
212 S32A_D565_Opaque_SSE2, // S32A_D565_Opaque | 203 S32A_D565_Opaque_SSE2, // S32A_D565_Opaque |
213 NULL, // S32A_D565_Blend | 204 NULL, // S32A_D565_Blend |
214 S32_D565_Opaque_Dither_SSE2, // S32_D565_Opaque_Dither | 205 S32_D565_Opaque_Dither_SSE2, // S32_D565_Opaque_Dither |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 } else { | 401 } else { |
411 return SkPlatformXfermodeFactory_impl(rec, mode); | 402 return SkPlatformXfermodeFactory_impl(rec, mode); |
412 } | 403 } |
413 } | 404 } |
414 | 405 |
415 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode); | 406 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode); |
416 | 407 |
417 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode) { | 408 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode) { |
418 return NULL; | 409 return NULL; |
419 } | 410 } |
OLD | NEW |