OLD | NEW |
1 | 1 |
| 2 #include "SkColor.h" |
| 3 #include "SkColorPriv.h" |
2 #include "SkBlitMask.h" | 4 #include "SkBlitMask.h" |
| 5 #include "SkUtilsArm.h" |
| 6 #include "SkBlitMask_opts_arm_neon.h" |
3 | 7 |
4 SkBlitMask::ColorProc SkBlitMask::PlatformColorProcs(SkBitmap::Config dstConfig, | 8 SkBlitMask::ColorProc SkBlitMask::PlatformColorProcs(SkBitmap::Config dstConfig, |
5 SkMask::Format maskFormat, | 9 SkMask::Format maskFormat, |
6 SkColor color) { | 10 SkColor color) { |
| 11 #if SK_ARM_NEON_IS_NONE |
| 12 return NULL; |
| 13 #else |
| 14 #if SK_ARM_NEON_IS_DYNAMIC |
| 15 if (!sk_cpu_arm_has_neon()) { |
| 16 return NULL; |
| 17 } |
| 18 #endif |
| 19 if ((SkBitmap::kARGB_8888_Config == dstConfig) && |
| 20 (SkMask::kA8_Format == maskFormat)) { |
| 21 return D32_A8_Factory_neon(color); |
| 22 } |
| 23 #endif |
| 24 |
| 25 // We don't need to handle the SkMask::kLCD16_Format case as the default |
| 26 // LCD16 will call us through SkBlitMask::PlatformBlitRowProcs16() |
| 27 |
7 return NULL; | 28 return NULL; |
8 } | 29 } |
9 | 30 |
10 SkBlitMask::BlitLCD16RowProc SkBlitMask::PlatformBlitRowProcs16(bool isOpaque) { | 31 SkBlitMask::BlitLCD16RowProc SkBlitMask::PlatformBlitRowProcs16(bool isOpaque) { |
11 return NULL; | 32 if (isOpaque) { |
| 33 return SK_ARM_NEON_WRAP(SkBlitLCD16OpaqueRow); |
| 34 } else { |
| 35 return SK_ARM_NEON_WRAP(SkBlitLCD16Row); |
| 36 } |
12 } | 37 } |
13 | 38 |
14 SkBlitMask::RowProc SkBlitMask::PlatformRowProcs(SkBitmap::Config dstConfig, | 39 SkBlitMask::RowProc SkBlitMask::PlatformRowProcs(SkBitmap::Config dstConfig, |
15 SkMask::Format maskFormat, | 40 SkMask::Format maskFormat, |
16 RowFlags flags) { | 41 RowFlags flags) { |
17 return NULL; | 42 return NULL; |
18 } | 43 } |
OLD | NEW |