| 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 | 232 |
| 233 target->drawState()->setDefaultVertexAttribs(); | 233 target->drawState()->setDefaultVertexAttribs(); |
| 234 if (!arg->set(target, maxPts, maxIdxs)) { | 234 if (!arg->set(target, maxPts, maxIdxs)) { |
| 235 return false; | 235 return false; |
| 236 } | 236 } |
| 237 | 237 |
| 238 uint16_t* idxBase = reinterpret_cast<uint16_t*>(arg->indices()); | 238 uint16_t* idxBase = reinterpret_cast<uint16_t*>(arg->indices()); |
| 239 uint16_t* idx = idxBase; | 239 uint16_t* idx = idxBase; |
| 240 uint16_t subpathIdxStart = 0; | 240 uint16_t subpathIdxStart = 0; |
| 241 | 241 |
| 242 GrPoint* base = reinterpret_cast<GrPoint*>(arg->vertices()); | 242 SkPoint* base = reinterpret_cast<SkPoint*>(arg->vertices()); |
| 243 SkASSERT(NULL != base); | 243 SkASSERT(NULL != base); |
| 244 GrPoint* vert = base; | 244 SkPoint* vert = base; |
| 245 | 245 |
| 246 GrPoint pts[4]; | 246 SkPoint pts[4]; |
| 247 | 247 |
| 248 bool first = true; | 248 bool first = true; |
| 249 int subpath = 0; | 249 int subpath = 0; |
| 250 | 250 |
| 251 SkPath::Iter iter(path, false); | 251 SkPath::Iter iter(path, false); |
| 252 | 252 |
| 253 for (;;) { | 253 for (;;) { |
| 254 SkPath::Verb verb = iter.next(pts); | 254 SkPath::Verb verb = iter.next(pts); |
| 255 switch (verb) { | 255 switch (verb) { |
| 256 case SkPath::kConic_Verb: | 256 case SkPath::kConic_Verb: |
| (...skipping 271 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 |