Fix problems with SampleApp Fuzzer due to issues in iterating over degenerate paths.
The fuzzer gets my vote as best test tool ever.

There are several issues outstanding: crashes in FixedPoint and a crash in the
path filling code that is most likely due to clipping problems (but maybe not).

BUG=425
Review URL: http://codereview.appspot.com/5503080

git-svn-id: http://skia.googlecode.com/svn/trunk@2936 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 7e6ac8c..22860bf 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -1185,9 +1185,10 @@
     fVerbs = path.fVerbs.begin();
     fVerbStop = path.fVerbs.end();
     fLastPt.fX = fLastPt.fY = 0;
+    fMoveTo.fX = fMoveTo.fY = 0;
     fForceClose = SkToU8(forceClose);
     fNeedClose = false;
-    fSegmentState = kAfterPrimitive_SegmentState;
+    fSegmentState = kAfterClose_SegmentState;
 }
 
 bool SkPath::Iter::isClosedContour() const {
@@ -1279,10 +1280,6 @@
         unsigned verb = *fVerbs;
         switch (verb) {
             case kMove_Verb:
-                // Set state for the next method.
-                fSegmentState = kAfterMove_SegmentState;
-                fMoveTo = fPts[0];
-
                 // Keep a record of this most recent move
                 lastMoveVerb = fVerbs;
                 lastMovePt = fPts;
@@ -1385,16 +1382,13 @@
             if (fVerbs == fVerbStop) {    // might be a trailing moveto
                 return kDone_Verb;
             }
-#ifdef SK_OLD_EMPTY_PATH_BEHAVIOR
             fMoveTo = *srcPts;
-#endif
             if (pts) {
                 pts[0] = *srcPts;
             }
             srcPts += 1;
-#ifdef SK_OLD_EMPTY_PATH_BEHAVIOR
             fSegmentState = kAfterMove_SegmentState;
-#else
+#ifndef SK_OLD_EMPTY_PATH_BEHAVIOR
             fLastPt = fMoveTo;
 #endif
             fNeedClose = fForceClose;