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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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[] = { | 219 static const SkBlitRow::ColorProc16 platform_565_colorprocs_SSE2[] = { |
220 Color32A_D565_SSE4, // Color32A_D565, | 220 Color32A_D565_SSE2, // Color32A_D565, |
221 NULL, // Color32A_D565_Dither | 221 NULL, // Color32A_D565_Dither |
222 }; | 222 }; |
223 | 223 |
224 SkBlitRow::ColorProc16 SkBlitRow::PlatformColorFactory565(unsigned flags) { | 224 SkBlitRow::ColorProc16 SkBlitRow::PlatformColorFactory565(unsigned flags) { |
225 if (supports_simd(SK_CPU_SSE_LEVEL_SSE41)) { | 225 /* If you're thinking about writing an SSE4 version of this, do check it's |
226 return platform_565_colorprocs_SSE4[flags]; | 226 * actually faster on Atom. Our original SSE4 version was slower than this |
| 227 * SSE2 version on Silvermont, and only marginally faster on a Core i7, |
| 228 * mainly due to the MULLD timings. |
| 229 */ |
| 230 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) { |
| 231 return platform_565_colorprocs_SSE2[flags]; |
227 } else { | 232 } else { |
228 return NULL; | 233 return NULL; |
229 } | 234 } |
230 } | 235 } |
231 | 236 |
232 static const SkBlitRow::Proc32 platform_32_procs_SSE2[] = { | 237 static const SkBlitRow::Proc32 platform_32_procs_SSE2[] = { |
233 NULL, // S32_Opaque, | 238 NULL, // S32_Opaque, |
234 S32_Blend_BlitRow32_SSE2, // S32_Blend, | 239 S32_Blend_BlitRow32_SSE2, // S32_Blend, |
235 S32A_Opaque_BlitRow32_SSE2, // S32A_Opaque | 240 S32A_Opaque_BlitRow32_SSE2, // S32A_Opaque |
236 S32A_Blend_BlitRow32_SSE2, // S32A_Blend, | 241 S32A_Blend_BlitRow32_SSE2, // S32A_Blend, |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 } else { | 411 } else { |
407 return SkPlatformXfermodeFactory_impl(rec, mode); | 412 return SkPlatformXfermodeFactory_impl(rec, mode); |
408 } | 413 } |
409 } | 414 } |
410 | 415 |
411 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode); | 416 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode); |
412 | 417 |
413 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode) { | 418 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode) { |
414 return NULL; | 419 return NULL; |
415 } | 420 } |
OLD | NEW |