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

Side by Side Diff: src/utils/SkDumpCanvas.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/pathops/SkReduceOrder.cpp ('k') | src/utils/SkParsePath.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 "SkDumpCanvas.h" 9 #include "SkDumpCanvas.h"
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 break; 77 break;
78 case SkPath::kCubic_Verb: 78 case SkPath::kCubic_Verb:
79 str->appendf(" C%g,%g,%g,%g,%g,%g", pts[1].fX, pts[1].fY, 79 str->appendf(" C%g,%g,%g,%g,%g,%g", pts[1].fX, pts[1].fY,
80 pts[2].fX, pts[2].fY, pts[3].fX, pts[3].fY); 80 pts[2].fX, pts[2].fY, pts[3].fX, pts[3].fY);
81 break; 81 break;
82 case SkPath::kClose_Verb: 82 case SkPath::kClose_Verb:
83 str->append("X"); 83 str->append("X");
84 break; 84 break;
85 case SkPath::kDone_Verb: 85 case SkPath::kDone_Verb:
86 return; 86 return;
87 case SkPath::kConic_Verb:
88 SkASSERT(0);
89 break;
87 } 90 }
88 } 91 }
89 } 92 }
90 93
91 static void toString(const SkPath& path, SkString* str) { 94 static void toString(const SkPath& path, SkString* str) {
92 if (path.isEmpty()) { 95 if (path.isEmpty()) {
93 str->append("path:empty"); 96 str->append("path:empty");
94 } else { 97 } else {
95 toString(path.getBounds(), str); 98 toString(path.getBounds(), str);
96 #if 1 99 #if 1
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 512
510 /////////////////////////////////////////////////////////////////////////////// 513 ///////////////////////////////////////////////////////////////////////////////
511 514
512 static void dumpToDebugf(const char text[], void*) { 515 static void dumpToDebugf(const char text[], void*) {
513 SkDebugf("%s\n", text); 516 SkDebugf("%s\n", text);
514 } 517 }
515 518
516 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {} 519 SkDebugfDumper::SkDebugfDumper() : INHERITED(dumpToDebugf, NULL) {}
517 520
518 #endif 521 #endif
OLDNEW
« no previous file with comments | « src/pathops/SkReduceOrder.cpp ('k') | src/utils/SkParsePath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698