| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 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 "SkFloatingPoint.h" | 8 #include "SkFloatingPoint.h" |
| 9 #include "SkOpts.h" | 9 #include "SkOpts.h" |
| 10 #define SK_OPTS_NS neon |
| 11 #include "SkBlurImageFilter_opts.h" |
| 10 #include "SkXfermode_opts.h" | 12 #include "SkXfermode_opts.h" |
| 11 | 13 |
| 12 namespace neon { // This helps identify methods from this file when debugging /
profiling. | 14 namespace neon { // This helps identify methods from this file when debugging /
profiling. |
| 13 | 15 |
| 14 static float rsqrt(float x) { | 16 static float rsqrt(float x) { |
| 15 return sk_float_rsqrt(x); // This sk_float_rsqrt copy will take the NEON co
mpile-time path. | 17 return sk_float_rsqrt(x); // This sk_float_rsqrt copy will take the NEON co
mpile-time path. |
| 16 } | 18 } |
| 17 | 19 |
| 18 static void memset16(uint16_t* dst, uint16_t value, int n) { | 20 static void memset16(uint16_t* dst, uint16_t value, int n) { |
| 19 uint16x8_t v8 = vdupq_n_u16(value); | 21 uint16x8_t v8 = vdupq_n_u16(value); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 } | 66 } |
| 65 | 67 |
| 66 } // namespace neon | 68 } // namespace neon |
| 67 | 69 |
| 68 namespace SkOpts { | 70 namespace SkOpts { |
| 69 void Init_neon() { | 71 void Init_neon() { |
| 70 rsqrt = neon::rsqrt; | 72 rsqrt = neon::rsqrt; |
| 71 memset16 = neon::memset16; | 73 memset16 = neon::memset16; |
| 72 memset32 = neon::memset32; | 74 memset32 = neon::memset32; |
| 73 create_xfermode = SkCreate4pxXfermode; | 75 create_xfermode = SkCreate4pxXfermode; |
| 76 |
| 77 static const auto x = neon::kX, y = neon::kY; |
| 78 box_blur_xx = neon::box_blur<x,x>; |
| 79 box_blur_xy = neon::box_blur<x,y>; |
| 80 box_blur_yx = neon::box_blur<y,x>; |
| 74 } | 81 } |
| 75 } | 82 } |
| OLD | NEW |