Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/opts/SkOpts_neon.cpp

Issue 1264103004: Port SkBlurImage opts to SkOpts. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rename to match src/effects Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/opts/SkBlurImage_opts_none.cpp ('k') | src/opts/SkOpts_sse2.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « src/opts/SkBlurImage_opts_none.cpp ('k') | src/opts/SkOpts_sse2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698