OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 #ifndef SkLinearBitmapPipeline_core_DEFINED | 8 #ifndef SkLinearBitmapPipeline_core_DEFINED |
9 #define SkLinearBitmapPipeline_core_DEFINED | 9 #define SkLinearBitmapPipeline_core_DEFINED |
10 | 10 |
11 #include <cmath> | 11 #include <cmath> |
| 12 #include "SkNx.h" |
12 | 13 |
13 // New bilerp strategy: | 14 // New bilerp strategy: |
14 // Pass through on bilerpList4 and bilerpListFew (analogs to pointList), introdu
ce bilerpEdge | 15 // Pass through on bilerpList4 and bilerpListFew (analogs to pointList), introdu
ce bilerpEdge |
15 // which takes 4 points. If the sample spans an edge, then break it into a biler
pEdge. Bilerp | 16 // which takes 4 points. If the sample spans an edge, then break it into a biler
pEdge. Bilerp |
16 // span then becomes a normal span except in special cases where an extra Y is g
iven. The bilerp | 17 // span then becomes a normal span except in special cases where an extra Y is g
iven. The bilerp |
17 // need to stay single point calculations until the tile layer. | 18 // need to stay single point calculations until the tile layer. |
18 // TODO: | 19 // TODO: |
19 // - edge span predicate. | 20 // - edge span predicate. |
20 // - introduce new point API | 21 // - introduce new point API |
21 // - Add tile for new api. | 22 // - Add tile for new api. |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 xs = xs + fourDx; | 182 xs = xs + fourDx; |
182 count -= 4; | 183 count -= 4; |
183 } | 184 } |
184 if (count > 0) { | 185 if (count > 0) { |
185 stage->pointListFew(count, xs, ys); | 186 stage->pointListFew(count, xs, ys); |
186 } | 187 } |
187 } | 188 } |
188 } // namespace | 189 } // namespace |
189 | 190 |
190 #endif // SkLinearBitmapPipeline_core_DEFINED | 191 #endif // SkLinearBitmapPipeline_core_DEFINED |
OLD | NEW |