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

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

Issue 1264543006: Port SkXfermode opts to SkOpts.h (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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/core/SkXfermode.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 "SkOpts.h" 9 #include "SkOpts.h"
9 #include "SkFloatingPoint.h" 10 #include "SkXfermode_opts.h"
10 11
11 namespace neon { // This helps identify methods from this file when debugging / profiling. 12 namespace neon { // This helps identify methods from this file when debugging / profiling.
12 13
13 static float rsqrt(float x) { 14 static float rsqrt(float x) {
14 return sk_float_rsqrt(x); // This sk_float_rsqrt copy will take the NEON co mpile-time path. 15 return sk_float_rsqrt(x); // This sk_float_rsqrt copy will take the NEON co mpile-time path.
15 } 16 }
16 17
17 static void memset16(uint16_t* dst, uint16_t value, int n) { 18 static void memset16(uint16_t* dst, uint16_t value, int n) {
18 uint16x8_t v8 = vdupq_n_u16(value); 19 uint16x8_t v8 = vdupq_n_u16(value);
19 uint16x8x4_t v32 = {{ v8, v8, v8, v8 }}; 20 uint16x8x4_t v32 = {{ v8, v8, v8, v8 }};
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 60 }
60 if (n & 1) { 61 if (n & 1) {
61 *dst = value; 62 *dst = value;
62 } 63 }
63 } 64 }
64 65
65 } // namespace neon 66 } // namespace neon
66 67
67 namespace SkOpts { 68 namespace SkOpts {
68 void Init_neon() { 69 void Init_neon() {
69 rsqrt = neon::rsqrt; 70 rsqrt = neon::rsqrt;
70 memset16 = neon::memset16; 71 memset16 = neon::memset16;
71 memset32 = neon::memset32; 72 memset32 = neon::memset32;
73 create_xfermode = SkCreate4pxXfermode;
72 } 74 }
73 } 75 }
OLDNEW
« no previous file with comments | « src/core/SkXfermode.cpp ('k') | src/opts/SkOpts_sse2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698