Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(454)

Side by Side Diff: src/gpu/GrDefaultPathRenderer.cpp

Issue 16195004: add asserts to point<-->verb helpers (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrAAHairLinePathRenderer.cpp ('k') | src/gpu/gl/GrGLPath.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "GrDefaultPathRenderer.h" 9 #include "GrDefaultPathRenderer.h"
10 10
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 GrPoint pts[4]; 248 GrPoint pts[4];
249 249
250 bool first = true; 250 bool first = true;
251 int subpath = 0; 251 int subpath = 0;
252 252
253 SkPath::Iter iter(path, false); 253 SkPath::Iter iter(path, false);
254 254
255 for (;;) { 255 for (;;) {
256 SkPath::Verb verb = iter.next(pts); 256 SkPath::Verb verb = iter.next(pts);
257 switch (verb) { 257 switch (verb) {
258 case SkPath::kConic_Verb:
259 SkASSERT(0);
260 break;
258 case SkPath::kMove_Verb: 261 case SkPath::kMove_Verb:
259 if (!first) { 262 if (!first) {
260 uint16_t currIdx = (uint16_t) (vert - base); 263 uint16_t currIdx = (uint16_t) (vert - base);
261 subpathIdxStart = currIdx; 264 subpathIdxStart = currIdx;
262 ++subpath; 265 ++subpath;
263 } 266 }
264 *vert = pts[0]; 267 *vert = pts[0];
265 vert++; 268 vert++;
266 break; 269 break;
267 case SkPath::kLine_Verb: 270 case SkPath::kLine_Verb:
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 false); 513 false);
511 } 514 }
512 515
513 void GrDefaultPathRenderer::onStencilPath(const SkPath& path, 516 void GrDefaultPathRenderer::onStencilPath(const SkPath& path,
514 const SkStrokeRec& stroke, 517 const SkStrokeRec& stroke,
515 GrDrawTarget* target) { 518 GrDrawTarget* target) {
516 GrAssert(SkPath::kInverseEvenOdd_FillType != path.getFillType()); 519 GrAssert(SkPath::kInverseEvenOdd_FillType != path.getFillType());
517 GrAssert(SkPath::kInverseWinding_FillType != path.getFillType()); 520 GrAssert(SkPath::kInverseWinding_FillType != path.getFillType());
518 this->internalDrawPath(path, stroke, target, true); 521 this->internalDrawPath(path, stroke, target, true);
519 } 522 }
OLDNEW
« no previous file with comments | « src/gpu/GrAAHairLinePathRenderer.cpp ('k') | src/gpu/gl/GrGLPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698