OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "GrDefaultPathRenderer.h" | 8 #include "GrDefaultPathRenderer.h" |
9 | 9 |
10 #include "GrContext.h" | 10 #include "GrContext.h" |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 { | 198 { |
199 SkScalar srcSpaceTolSqd = SkScalarMul(srcSpaceTol, srcSpaceTol); | 199 SkScalar srcSpaceTolSqd = SkScalarMul(srcSpaceTol, srcSpaceTol); |
200 int contourCnt; | 200 int contourCnt; |
201 int maxPts = GrPathUtils::worstCasePointCount(path, &contourCnt, | 201 int maxPts = GrPathUtils::worstCasePointCount(path, &contourCnt, |
202 srcSpaceTol); | 202 srcSpaceTol); |
203 | 203 |
204 if (maxPts <= 0) { | 204 if (maxPts <= 0) { |
205 return false; | 205 return false; |
206 } | 206 } |
207 if (maxPts > ((int)SK_MaxU16 + 1)) { | 207 if (maxPts > ((int)SK_MaxU16 + 1)) { |
208 GrPrintf("Path not rendered, too many verts (%d)\n", maxPts); | 208 SkDebugf("Path not rendered, too many verts (%d)\n", maxPts); |
209 return false; | 209 return false; |
210 } | 210 } |
211 | 211 |
212 bool indexed = contourCnt > 1; | 212 bool indexed = contourCnt > 1; |
213 | 213 |
214 const bool isHairline = stroke.isHairlineStyle(); | 214 const bool isHairline = stroke.isHairlineStyle(); |
215 | 215 |
216 int maxIdxs = 0; | 216 int maxIdxs = 0; |
217 if (isHairline) { | 217 if (isHairline) { |
218 if (indexed) { | 218 if (indexed) { |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 false); | 528 false); |
529 } | 529 } |
530 | 530 |
531 void GrDefaultPathRenderer::onStencilPath(const SkPath& path, | 531 void GrDefaultPathRenderer::onStencilPath(const SkPath& path, |
532 const SkStrokeRec& stroke, | 532 const SkStrokeRec& stroke, |
533 GrDrawTarget* target) { | 533 GrDrawTarget* target) { |
534 SkASSERT(SkPath::kInverseEvenOdd_FillType != path.getFillType()); | 534 SkASSERT(SkPath::kInverseEvenOdd_FillType != path.getFillType()); |
535 SkASSERT(SkPath::kInverseWinding_FillType != path.getFillType()); | 535 SkASSERT(SkPath::kInverseWinding_FillType != path.getFillType()); |
536 this->internalDrawPath(path, stroke, target, true); | 536 this->internalDrawPath(path, stroke, target, true); |
537 } | 537 } |
OLD | NEW |