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

Unified Diff: debugger/SkObjectParser.cpp

Issue 16224008: Update debugger for addition of Conic path verb (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Addressed code review comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: debugger/SkObjectParser.cpp
===================================================================
--- debugger/SkObjectParser.cpp (revision 9434)
+++ debugger/SkObjectParser.cpp (working copy)
@@ -138,11 +138,11 @@
mPath->append("P): ");
static const char* gVerbStrings[] = {
- "Move", "Line", "Quad", "Cubic", "Close", "Done"
+ "Move", "Line", "Quad", "Conic", "Cubic", "Close", "Done"
};
- static const int gPtsPerVerb[] = { 1, 1, 2, 3, 0, 0 };
- static const int gPtOffsetPerVerb[] = { 0, 1, 1, 1, 0, 0 };
- SkASSERT(SkPath::kDone_Verb == 5);
+ static const int gPtsPerVerb[] = { 1, 1, 2, 2, 3, 0, 0 };
+ static const int gPtOffsetPerVerb[] = { 0, 1, 1, 1, 1, 0, 0 };
+ SkASSERT(SkPath::kDone_Verb == 6);
SkPath::Iter iter(const_cast<SkPath&>(path), false);
SkPath::Verb verb;
@@ -160,8 +160,16 @@
mPath->appendScalar(points[gPtOffsetPerVerb[verb]+i].fX);
mPath->append(", ");
mPath->appendScalar(points[gPtOffsetPerVerb[verb]+i].fY);
- mPath->append(") ");
+ mPath->append(")");
}
+
+ if (SkPath::kConic_Verb == verb) {
+ mPath->append("(");
+ mPath->appendScalar(iter.conicWeight());
+ mPath->append(")");
+ }
+
+ mPath->append(" ");
}
SkString* boundStr = SkObjectParser::RectToString(path.getBounds(), " Bound: ");
« 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