| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 fMatrixProc = ClampX_ClampY_nofilter_scale_SSE2; | 190 fMatrixProc = ClampX_ClampY_nofilter_scale_SSE2; |
| 191 } else if (fMatrixProc == ClampX_ClampY_filter_affine) { | 191 } else if (fMatrixProc == ClampX_ClampY_filter_affine) { |
| 192 fMatrixProc = ClampX_ClampY_filter_affine_SSE2; | 192 fMatrixProc = ClampX_ClampY_filter_affine_SSE2; |
| 193 } else if (fMatrixProc == ClampX_ClampY_nofilter_affine) { | 193 } else if (fMatrixProc == ClampX_ClampY_nofilter_affine) { |
| 194 fMatrixProc = ClampX_ClampY_nofilter_affine_SSE2; | 194 fMatrixProc = ClampX_ClampY_nofilter_affine_SSE2; |
| 195 } | 195 } |
| 196 } | 196 } |
| 197 | 197 |
| 198 //////////////////////////////////////////////////////////////////////////////// | 198 //////////////////////////////////////////////////////////////////////////////// |
| 199 | 199 |
| 200 static SkBlitRow::Proc16 platform_16_procs[] = { | 200 static const SkBlitRow::Proc16 platform_16_procs[] = { |
| 201 S32_D565_Opaque_SSE2, // S32_D565_Opaque | 201 S32_D565_Opaque_SSE2, // S32_D565_Opaque |
| 202 NULL, // S32_D565_Blend | 202 NULL, // S32_D565_Blend |
| 203 S32A_D565_Opaque_SSE2, // S32A_D565_Opaque | 203 S32A_D565_Opaque_SSE2, // S32A_D565_Opaque |
| 204 NULL, // S32A_D565_Blend | 204 NULL, // S32A_D565_Blend |
| 205 S32_D565_Opaque_Dither_SSE2, // S32_D565_Opaque_Dither | 205 S32_D565_Opaque_Dither_SSE2, // S32_D565_Opaque_Dither |
| 206 NULL, // S32_D565_Blend_Dither | 206 NULL, // S32_D565_Blend_Dither |
| 207 S32A_D565_Opaque_Dither_SSE2, // S32A_D565_Opaque_Dither | 207 S32A_D565_Opaque_Dither_SSE2, // S32A_D565_Opaque_Dither |
| 208 NULL, // S32A_D565_Blend_Dither | 208 NULL, // S32A_D565_Blend_Dither |
| 209 }; | 209 }; |
| 210 | 210 |
| 211 SkBlitRow::Proc16 SkBlitRow::PlatformFactory565(unsigned flags) { | 211 SkBlitRow::Proc16 SkBlitRow::PlatformFactory565(unsigned flags) { |
| 212 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) { | 212 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) { |
| 213 return platform_16_procs[flags]; | 213 return platform_16_procs[flags]; |
| 214 } else { | 214 } else { |
| 215 return NULL; | 215 return NULL; |
| 216 } | 216 } |
| 217 } | 217 } |
| 218 | 218 |
| 219 static const SkBlitRow::ColorProc16 platform_565_colorprocs_SSE4[] = { |
| 220 Color32A_D565_SSE4, // Color32A_D565, |
| 221 NULL, // Color32A_D565_Dither |
| 222 }; |
| 223 |
| 219 SkBlitRow::ColorProc16 SkBlitRow::PlatformColorFactory565(unsigned flags) { | 224 SkBlitRow::ColorProc16 SkBlitRow::PlatformColorFactory565(unsigned flags) { |
| 220 return NULL; | 225 if (supports_simd(SK_CPU_SSE_LEVEL_SSE41)) { |
| 226 return platform_565_colorprocs_SSE4[flags]; |
| 227 } else { |
| 228 return NULL; |
| 229 } |
| 221 } | 230 } |
| 222 | 231 |
| 223 static SkBlitRow::Proc32 platform_32_procs_SSE2[] = { | 232 static const SkBlitRow::Proc32 platform_32_procs_SSE2[] = { |
| 224 NULL, // S32_Opaque, | 233 NULL, // S32_Opaque, |
| 225 S32_Blend_BlitRow32_SSE2, // S32_Blend, | 234 S32_Blend_BlitRow32_SSE2, // S32_Blend, |
| 226 S32A_Opaque_BlitRow32_SSE2, // S32A_Opaque | 235 S32A_Opaque_BlitRow32_SSE2, // S32A_Opaque |
| 227 S32A_Blend_BlitRow32_SSE2, // S32A_Blend, | 236 S32A_Blend_BlitRow32_SSE2, // S32A_Blend, |
| 228 }; | 237 }; |
| 229 | 238 |
| 230 static SkBlitRow::Proc32 platform_32_procs_SSE4[] = { | 239 static const SkBlitRow::Proc32 platform_32_procs_SSE4[] = { |
| 231 NULL, // S32_Opaque, | 240 NULL, // S32_Opaque, |
| 232 S32_Blend_BlitRow32_SSE2, // S32_Blend, | 241 S32_Blend_BlitRow32_SSE2, // S32_Blend, |
| 233 S32A_Opaque_BlitRow32_SSE4, // S32A_Opaque | 242 S32A_Opaque_BlitRow32_SSE4, // S32A_Opaque |
| 234 S32A_Blend_BlitRow32_SSE2, // S32A_Blend, | 243 S32A_Blend_BlitRow32_SSE2, // S32A_Blend, |
| 235 }; | 244 }; |
| 236 | 245 |
| 237 SkBlitRow::Proc32 SkBlitRow::PlatformProcs32(unsigned flags) { | 246 SkBlitRow::Proc32 SkBlitRow::PlatformProcs32(unsigned flags) { |
| 238 if (supports_simd(SK_CPU_SSE_LEVEL_SSE41)) { | 247 if (supports_simd(SK_CPU_SSE_LEVEL_SSE41)) { |
| 239 return platform_32_procs_SSE4[flags]; | 248 return platform_32_procs_SSE4[flags]; |
| 240 } else | 249 } else |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 } else { | 406 } else { |
| 398 return SkPlatformXfermodeFactory_impl(rec, mode); | 407 return SkPlatformXfermodeFactory_impl(rec, mode); |
| 399 } | 408 } |
| 400 } | 409 } |
| 401 | 410 |
| 402 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode); | 411 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode); |
| 403 | 412 |
| 404 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode) { | 413 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode) { |
| 405 return NULL; | 414 return NULL; |
| 406 } | 415 } |
| OLD | NEW |