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 | 8 |
9 #include "GrAAHairLinePathRenderer.h" | 9 #include "GrAAHairLinePathRenderer.h" |
10 | 10 |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 GrRect bounds; | 214 GrRect bounds; |
215 GrIRect ibounds; | 215 GrIRect ibounds; |
216 | 216 |
217 bool persp = m.hasPerspective(); | 217 bool persp = m.hasPerspective(); |
218 | 218 |
219 for (;;) { | 219 for (;;) { |
220 GrPoint pathPts[4]; | 220 GrPoint pathPts[4]; |
221 GrPoint devPts[4]; | 221 GrPoint devPts[4]; |
222 SkPath::Verb verb = iter.next(pathPts); | 222 SkPath::Verb verb = iter.next(pathPts); |
223 switch (verb) { | 223 switch (verb) { |
224 case SkPath::kMove_Verb: | 224 case SkPath::kConic_Verb: |
| 225 SkASSERT(0); |
| 226 break; |
| 227 case SkPath::kMove_Verb: |
225 break; | 228 break; |
226 case SkPath::kLine_Verb: | 229 case SkPath::kLine_Verb: |
227 m.mapPoints(devPts, pathPts, 2); | 230 m.mapPoints(devPts, pathPts, 2); |
228 bounds.setBounds(devPts, 2); | 231 bounds.setBounds(devPts, 2); |
229 bounds.outset(SK_Scalar1, SK_Scalar1); | 232 bounds.outset(SK_Scalar1, SK_Scalar1); |
230 bounds.roundOut(&ibounds); | 233 bounds.roundOut(&ibounds); |
231 if (SkIRect::Intersects(devClipBounds, ibounds)) { | 234 if (SkIRect::Intersects(devClipBounds, ibounds)) { |
232 SkPoint* pts = lines->push_back_n(2); | 235 SkPoint* pts = lines->push_back_n(2); |
233 pts[0] = devPts[0]; | 236 pts[0] = devPts[0]; |
234 pts[1] = devPts[1]; | 237 pts[1] = devPts[1]; |
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
895 0, // startI | 898 0, // startI |
896 kVertsPerQuad*n, // vCount | 899 kVertsPerQuad*n, // vCount |
897 kIdxsPerQuad*n, // iCount | 900 kIdxsPerQuad*n, // iCount |
898 &devBounds); | 901 &devBounds); |
899 quads += n; | 902 quads += n; |
900 } | 903 } |
901 target->resetIndexSource(); | 904 target->resetIndexSource(); |
902 | 905 |
903 return true; | 906 return true; |
904 } | 907 } |
OLD | NEW |