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

Side by Side Diff: src/gpu/GrAAHairLinePathRenderer.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/effects/SkCornerPathEffect.cpp ('k') | src/gpu/GrDefaultPathRenderer.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 "GrAAHairLinePathRenderer.h" 9 #include "GrAAHairLinePathRenderer.h"
10 10
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « src/effects/SkCornerPathEffect.cpp ('k') | src/gpu/GrDefaultPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698