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 "SubsetPath.h" | 8 #include "SubsetPath.h" |
| 9 #include "SkMathPriv.h" |
9 | 10 |
10 SubsetPath::SubsetPath(const SkPath& path) | 11 SubsetPath::SubsetPath(const SkPath& path) |
11 : fPath(path) | 12 : fPath(path) |
12 , fSubset(1) { | 13 , fSubset(1) { |
13 } | 14 } |
14 | 15 |
15 int SubsetPath::range(int* end) const { | 16 int SubsetPath::range(int* end) const { |
16 int leadingZero = SkCLZ(fSubset); | 17 int leadingZero = SkCLZ(fSubset); |
17 int parts = 1 << (31 - leadingZero); | 18 int parts = 1 << (31 - leadingZero); |
18 int partIndex = fSubset - parts; | 19 int partIndex = fSubset - parts; |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 addLineTo = false; | 232 addLineTo = false; |
232 continue; | 233 continue; |
233 default: | 234 default: |
234 SkDEBUGFAIL("bad verb"); | 235 SkDEBUGFAIL("bad verb"); |
235 return result; | 236 return result; |
236 } | 237 } |
237 addLineTo = !enabled; | 238 addLineTo = !enabled; |
238 } | 239 } |
239 return result; | 240 return result; |
240 } | 241 } |
OLD | NEW |