dump path fill type with data
SkPath::dump() and SkPath::dumpHex() dump the fill type
in addition to the data so that the original path can
be faithfully reconstructed.
This may be a small part of why some error cases
aren't reproduced.
R=reed@google.com
BUG=skia:6041
Change-Id: Ice86bf08ea907a6b87ceef182a9316a3c979af0b
Reviewed-on: https://skia-review.googlesource.com/6185
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 8241c10..7f233f2 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -2147,11 +2147,15 @@
SkPoint pts[4];
Verb verb;
- if (!wStream) {
- SkDebugf("path: forceClose=%s\n", forceClose ? "true" : "false");
- }
SkString builder;
-
+ char const * const gFillTypeStrs[] = {
+ "Winding",
+ "EvenOdd",
+ "InverseWinding",
+ "InverseEvenOdd",
+ };
+ builder.printf("path.setFillType(SkPath::k%s_FillType);\n",
+ gFillTypeStrs[(int) this->getFillType()]);
while ((verb = iter.next(pts, false)) != kDone_Verb) {
switch (verb) {
case kMove_Verb: