OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "SkEdgeBuilder.h" | 8 #include "SkEdgeBuilder.h" |
9 #include "SkPath.h" | 9 #include "SkPath.h" |
10 #include "SkEdge.h" | 10 #include "SkEdge.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 int shiftUp) { | 165 int shiftUp) { |
166 fAlloc.reset(); | 166 fAlloc.reset(); |
167 fList.reset(); | 167 fList.reset(); |
168 fShiftUp = shiftUp; | 168 fShiftUp = shiftUp; |
169 | 169 |
170 if (SkPath::kLine_SegmentMask == path.getSegmentMasks()) { | 170 if (SkPath::kLine_SegmentMask == path.getSegmentMasks()) { |
171 return this->buildPoly(path, iclip, shiftUp); | 171 return this->buildPoly(path, iclip, shiftUp); |
172 } | 172 } |
173 | 173 |
174 SkAutoConicToQuads quadder; | 174 SkAutoConicToQuads quadder; |
175 const SkScalar conicTol = (SK_Scalar1 / 4) * (1 << shiftUp); | 175 const SkScalar conicTol = SK_Scalar1 / 4; |
176 | 176 |
177 SkPath::Iter iter(path, true); | 177 SkPath::Iter iter(path, true); |
178 SkPoint pts[4]; | 178 SkPoint pts[4]; |
179 SkPath::Verb verb; | 179 SkPath::Verb verb; |
180 | 180 |
181 if (iclip) { | 181 if (iclip) { |
182 SkRect clip; | 182 SkRect clip; |
183 setShiftedClip(&clip, *iclip, shiftUp); | 183 setShiftedClip(&clip, *iclip, shiftUp); |
184 SkEdgeClipper clipper; | 184 SkEdgeClipper clipper; |
185 | 185 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 } | 256 } |
257 default: | 257 default: |
258 SkDEBUGFAIL("unexpected verb"); | 258 SkDEBUGFAIL("unexpected verb"); |
259 break; | 259 break; |
260 } | 260 } |
261 } | 261 } |
262 } | 262 } |
263 fEdgeList = fList.begin(); | 263 fEdgeList = fList.begin(); |
264 return fList.count(); | 264 return fList.count(); |
265 } | 265 } |
OLD | NEW |