blob: 11e172c0d1d37c54cb4479141df41e336cd05526 [file] [log] [blame]
commit-bot@chromium.orgcba73782014-05-29 15:57:47 +00001/*
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.orge997c262013-08-28 15:07:58 +00007
rmistry@google.comd6bab022013-12-02 13:50:38 +00008#include "SkColor.h"
9#include "SkColorPriv.h"
commit-bot@chromium.orge997c262013-08-28 15:07:58 +000010#include "SkBlitMask.h"
rmistry@google.comd6bab022013-12-02 13:50:38 +000011#include "SkUtilsArm.h"
12#include "SkBlitMask_opts_arm_neon.h"
commit-bot@chromium.orge997c262013-08-28 15:07:58 +000013
commit-bot@chromium.orgcba73782014-05-29 15:57:47 +000014SkBlitMask::ColorProc SkBlitMask::PlatformColorProcs(SkColorType dstCT,
commit-bot@chromium.orge997c262013-08-28 15:07:58 +000015 SkMask::Format maskFormat,
16 SkColor color) {
rmistry@google.comd6bab022013-12-02 13:50:38 +000017#if SK_ARM_NEON_IS_NONE
18 return NULL;
19#else
commit-bot@chromium.org0e8c8ef2014-02-06 21:27:40 +000020/* ** 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.comd6bab022013-12-02 13:50:38 +000022#if SK_ARM_NEON_IS_DYNAMIC
23 if (!sk_cpu_arm_has_neon()) {
24 return NULL;
25 }
26#endif
reedc77392e2014-06-02 13:07:26 -070027 if ((kN32_SkColorType == dstCT) &&
rmistry@google.comd6bab022013-12-02 13:50:38 +000028 (SkMask::kA8_Format == maskFormat)) {
29 return D32_A8_Factory_neon(color);
30 }
commit-bot@chromium.org0e8c8ef2014-02-06 21:27:40 +000031*/
rmistry@google.comd6bab022013-12-02 13:50:38 +000032#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.orge997c262013-08-28 15:07:58 +000037 return NULL;
38}
39
40SkBlitMask::BlitLCD16RowProc SkBlitMask::PlatformBlitRowProcs16(bool isOpaque) {
rmistry@google.comd6bab022013-12-02 13:50:38 +000041 if (isOpaque) {
42 return SK_ARM_NEON_WRAP(SkBlitLCD16OpaqueRow);
43 } else {
44 return SK_ARM_NEON_WRAP(SkBlitLCD16Row);
45 }
commit-bot@chromium.orge997c262013-08-28 15:07:58 +000046}
47
commit-bot@chromium.orgcba73782014-05-29 15:57:47 +000048SkBlitMask::RowProc SkBlitMask::PlatformRowProcs(SkColorType dstCT,
commit-bot@chromium.orge997c262013-08-28 15:07:58 +000049 SkMask::Format maskFormat,
50 RowFlags flags) {
51 return NULL;
52}