commit-bot@chromium.org | cba7378 | 2014-05-29 15:57:47 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
commit-bot@chromium.org | e997c26 | 2013-08-28 15:07:58 +0000 | [diff] [blame] | 7 | |
rmistry@google.com | d6bab02 | 2013-12-02 13:50:38 +0000 | [diff] [blame] | 8 | #include "SkColor.h" |
| 9 | #include "SkColorPriv.h" |
commit-bot@chromium.org | e997c26 | 2013-08-28 15:07:58 +0000 | [diff] [blame] | 10 | #include "SkBlitMask.h" |
rmistry@google.com | d6bab02 | 2013-12-02 13:50:38 +0000 | [diff] [blame] | 11 | #include "SkUtilsArm.h" |
| 12 | #include "SkBlitMask_opts_arm_neon.h" |
commit-bot@chromium.org | e997c26 | 2013-08-28 15:07:58 +0000 | [diff] [blame] | 13 | |
commit-bot@chromium.org | cba7378 | 2014-05-29 15:57:47 +0000 | [diff] [blame] | 14 | SkBlitMask::ColorProc SkBlitMask::PlatformColorProcs(SkColorType dstCT, |
commit-bot@chromium.org | e997c26 | 2013-08-28 15:07:58 +0000 | [diff] [blame] | 15 | SkMask::Format maskFormat, |
| 16 | SkColor color) { |
rmistry@google.com | d6bab02 | 2013-12-02 13:50:38 +0000 | [diff] [blame] | 17 | #if SK_ARM_NEON_IS_NONE |
| 18 | return NULL; |
| 19 | #else |
commit-bot@chromium.org | 0e8c8ef | 2014-02-06 21:27:40 +0000 | [diff] [blame] | 20 | /* ** This has been disabled until we can diagnose and fix the SIGILL generated |
| 21 | ** in the NEON code. See http://skbug.com/2067 for details. |
rmistry@google.com | d6bab02 | 2013-12-02 13:50:38 +0000 | [diff] [blame] | 22 | #if SK_ARM_NEON_IS_DYNAMIC |
| 23 | if (!sk_cpu_arm_has_neon()) { |
| 24 | return NULL; |
| 25 | } |
| 26 | #endif |
reed | c77392e | 2014-06-02 13:07:26 -0700 | [diff] [blame] | 27 | if ((kN32_SkColorType == dstCT) && |
rmistry@google.com | d6bab02 | 2013-12-02 13:50:38 +0000 | [diff] [blame] | 28 | (SkMask::kA8_Format == maskFormat)) { |
| 29 | return D32_A8_Factory_neon(color); |
| 30 | } |
commit-bot@chromium.org | 0e8c8ef | 2014-02-06 21:27:40 +0000 | [diff] [blame] | 31 | */ |
rmistry@google.com | d6bab02 | 2013-12-02 13:50:38 +0000 | [diff] [blame] | 32 | #endif |
| 33 | |
| 34 | // We don't need to handle the SkMask::kLCD16_Format case as the default |
| 35 | // LCD16 will call us through SkBlitMask::PlatformBlitRowProcs16() |
| 36 | |
commit-bot@chromium.org | e997c26 | 2013-08-28 15:07:58 +0000 | [diff] [blame] | 37 | return NULL; |
| 38 | } |
| 39 | |
| 40 | SkBlitMask::BlitLCD16RowProc SkBlitMask::PlatformBlitRowProcs16(bool isOpaque) { |
rmistry@google.com | d6bab02 | 2013-12-02 13:50:38 +0000 | [diff] [blame] | 41 | if (isOpaque) { |
| 42 | return SK_ARM_NEON_WRAP(SkBlitLCD16OpaqueRow); |
| 43 | } else { |
| 44 | return SK_ARM_NEON_WRAP(SkBlitLCD16Row); |
| 45 | } |
commit-bot@chromium.org | e997c26 | 2013-08-28 15:07:58 +0000 | [diff] [blame] | 46 | } |
| 47 | |
commit-bot@chromium.org | cba7378 | 2014-05-29 15:57:47 +0000 | [diff] [blame] | 48 | SkBlitMask::RowProc SkBlitMask::PlatformRowProcs(SkColorType dstCT, |
commit-bot@chromium.org | e997c26 | 2013-08-28 15:07:58 +0000 | [diff] [blame] | 49 | SkMask::Format maskFormat, |
| 50 | RowFlags flags) { |
| 51 | return NULL; |
| 52 | } |