skipRect should only work for lines (not quads or cubics)

The added unit test shows that we'll trigger SkASSERT failure if we
forgot to check that the edges are lines (instead of quads or cubics).
Similar to skia:7015, this bug is not triggered in our production
because we don't use DAA for convex paths by default. The skipRect is
an optimization just for convex paths.

Bug: skia:7051
Change-Id: Id87ce2d452ede0db9a48425541f473af19ee0572
Reviewed-on: https://skia-review.googlesource.com/48045
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
diff --git a/src/core/SkScan_DAAPath.cpp b/src/core/SkScan_DAAPath.cpp
index a12b6da..9250d02 100644
--- a/src/core/SkScan_DAAPath.cpp
+++ b/src/core/SkScan_DAAPath.cpp
@@ -173,8 +173,9 @@
             SkBezier* lb = list[i];
             SkBezier* rb = list[i + 1];
 
-            bool lDX0 = lb->fP0.fX == lb->fP1.fX;
-            bool rDX0 = rb->fP0.fX == rb->fP1.fX;
+            // fCount == 2 ensures that lb and rb are lines instead of quads or cubics.
+            bool lDX0 = lb->fP0.fX == lb->fP1.fX && lb->fCount == 2;
+            bool rDX0 = rb->fP0.fX == rb->fP1.fX && rb->fCount == 2;
             if (!lDX0 || !rDX0) { // make sure that the edges are vertical
                 continue;
             }