| 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 case SkPath::kDone_Verb: | 310 case SkPath::kDone_Verb: |
| 311 // uint16_t currIdx = (uint16_t) (vert - base); | 311 // uint16_t currIdx = (uint16_t) (vert - base); |
| 312 goto FINISHED; | 312 goto FINISHED; |
| 313 } | 313 } |
| 314 first = false; | 314 first = false; |
| 315 } | 315 } |
| 316 FINISHED: | 316 FINISHED: |
| 317 SkASSERT((vert - base) <= maxPts); | 317 SkASSERT((vert - base) <= maxPts); |
| 318 SkASSERT((idx - idxBase) <= maxIdxs); | 318 SkASSERT((idx - idxBase) <= maxIdxs); |
| 319 | 319 |
| 320 *vertexCnt = vert - base; | 320 *vertexCnt = static_cast<int>(vert - base); |
| 321 *indexCnt = idx - idxBase; | 321 *indexCnt = static_cast<int>(idx - idxBase); |
| 322 | 322 |
| 323 } | 323 } |
| 324 return true; | 324 return true; |
| 325 } | 325 } |
| 326 | 326 |
| 327 bool GrDefaultPathRenderer::internalDrawPath(const SkPath& path, | 327 bool GrDefaultPathRenderer::internalDrawPath(const SkPath& path, |
| 328 const SkStrokeRec& stroke, | 328 const SkStrokeRec& stroke, |
| 329 GrDrawTarget* target, | 329 GrDrawTarget* target, |
| 330 bool stencilOnly) { | 330 bool stencilOnly) { |
| 331 | 331 |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 false); | 512 false); |
| 513 } | 513 } |
| 514 | 514 |
| 515 void GrDefaultPathRenderer::onStencilPath(const SkPath& path, | 515 void GrDefaultPathRenderer::onStencilPath(const SkPath& path, |
| 516 const SkStrokeRec& stroke, | 516 const SkStrokeRec& stroke, |
| 517 GrDrawTarget* target) { | 517 GrDrawTarget* target) { |
| 518 SkASSERT(SkPath::kInverseEvenOdd_FillType != path.getFillType()); | 518 SkASSERT(SkPath::kInverseEvenOdd_FillType != path.getFillType()); |
| 519 SkASSERT(SkPath::kInverseWinding_FillType != path.getFillType()); | 519 SkASSERT(SkPath::kInverseWinding_FillType != path.getFillType()); |
| 520 this->internalDrawPath(path, stroke, target, true); | 520 this->internalDrawPath(path, stroke, target, true); |
| 521 } | 521 } |
| OLD | NEW |