commit-bot@chromium.org | e997c26 | 2013-08-28 15:07:58 +0000 | [diff] [blame] | 1 | |
commit-bot@chromium.org | dbe7f52 | 2013-11-27 17:08:36 +0000 | [diff] [blame^] | 2 | #include "SkColor.h" |
| 3 | #include "SkColorPriv.h" |
commit-bot@chromium.org | e997c26 | 2013-08-28 15:07:58 +0000 | [diff] [blame] | 4 | #include "SkBlitMask.h" |
commit-bot@chromium.org | dbe7f52 | 2013-11-27 17:08:36 +0000 | [diff] [blame^] | 5 | #include "SkUtilsArm.h" |
| 6 | #include "SkBlitMask_opts_arm_neon.h" |
commit-bot@chromium.org | e997c26 | 2013-08-28 15:07:58 +0000 | [diff] [blame] | 7 | |
| 8 | SkBlitMask::ColorProc SkBlitMask::PlatformColorProcs(SkBitmap::Config dstConfig, |
| 9 | SkMask::Format maskFormat, |
| 10 | SkColor color) { |
commit-bot@chromium.org | dbe7f52 | 2013-11-27 17:08:36 +0000 | [diff] [blame^] | 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 | |
commit-bot@chromium.org | e997c26 | 2013-08-28 15:07:58 +0000 | [diff] [blame] | 28 | return NULL; |
| 29 | } |
| 30 | |
| 31 | SkBlitMask::BlitLCD16RowProc SkBlitMask::PlatformBlitRowProcs16(bool isOpaque) { |
commit-bot@chromium.org | dbe7f52 | 2013-11-27 17:08:36 +0000 | [diff] [blame^] | 32 | if (isOpaque) { |
| 33 | return SK_ARM_NEON_WRAP(SkBlitLCD16OpaqueRow); |
| 34 | } else { |
| 35 | return SK_ARM_NEON_WRAP(SkBlitLCD16Row); |
| 36 | } |
commit-bot@chromium.org | e997c26 | 2013-08-28 15:07:58 +0000 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | SkBlitMask::RowProc SkBlitMask::PlatformRowProcs(SkBitmap::Config dstConfig, |
| 40 | SkMask::Format maskFormat, |
| 41 | RowFlags flags) { |
| 42 | return NULL; |
| 43 | } |