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

Side by Side Diff: src/core/SkPath.cpp

Issue 19540004: Avoid lineTo() duplication in SkPath::dump(). (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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 | « no previous file | no next file » | 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 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 9
10 #include "SkBuffer.h" 10 #include "SkBuffer.h"
(...skipping 2160 matching lines...) Expand 10 before | Expand all | Expand 10 after
2171 2171
2172 SkString builder; 2172 SkString builder;
2173 2173
2174 while ((verb = iter.next(pts, false)) != kDone_Verb) { 2174 while ((verb = iter.next(pts, false)) != kDone_Verb) {
2175 switch (verb) { 2175 switch (verb) {
2176 case kMove_Verb: 2176 case kMove_Verb:
2177 append_params(&builder, "path.moveTo", &pts[0], 1); 2177 append_params(&builder, "path.moveTo", &pts[0], 1);
2178 break; 2178 break;
2179 case kLine_Verb: 2179 case kLine_Verb:
2180 append_params(&builder, "path.lineTo", &pts[1], 1); 2180 append_params(&builder, "path.lineTo", &pts[1], 1);
2181 append_params(&builder, "path.lineTo", &pts[1], 1);
2182 break; 2181 break;
2183 case kQuad_Verb: 2182 case kQuad_Verb:
2184 append_params(&builder, "path.quadTo", &pts[1], 2); 2183 append_params(&builder, "path.quadTo", &pts[1], 2);
2185 break; 2184 break;
2186 case kConic_Verb: 2185 case kConic_Verb:
2187 append_params(&builder, "path.conicTo", &pts[1], 2, iter.conicWe ight()); 2186 append_params(&builder, "path.conicTo", &pts[1], 2, iter.conicWe ight());
2188 break; 2187 break;
2189 case kCubic_Verb: 2188 case kCubic_Verb:
2190 append_params(&builder, "path.cubicTo", &pts[1], 3); 2189 append_params(&builder, "path.cubicTo", &pts[1], 3);
2191 break; 2190 break;
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
2990 switch (this->getFillType()) { 2989 switch (this->getFillType()) {
2991 case SkPath::kEvenOdd_FillType: 2990 case SkPath::kEvenOdd_FillType:
2992 case SkPath::kInverseEvenOdd_FillType: 2991 case SkPath::kInverseEvenOdd_FillType:
2993 w &= 1; 2992 w &= 1;
2994 break; 2993 break;
2995 default: 2994 default:
2996 break; 2995 break;
2997 } 2996 }
2998 return SkToBool(w); 2997 return SkToBool(w);
2999 } 2998 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698