aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-01-31 15:19:21 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-01-31 15:19:21 +0000
commit9732f62eaec427e0d4a8de06748ebb59450dfe31 (patch)
treef84ab8e3f82ea3ce275f7f230427d3c6455f7702 /gm
parentc943bd5984df80a1e138c7ae81515620ce8a68e3 (diff)
Fix degenerate test in convex path renderer
Review URL: http://codereview.appspot.com/5581058/ git-svn-id: http://skia.googlecode.com/svn/trunk@3118 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm')
-rw-r--r--gm/convexpaths.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/gm/convexpaths.cpp b/gm/convexpaths.cpp
index b3800cd2d4..c72af079dd 100644
--- a/gm/convexpaths.cpp
+++ b/gm/convexpaths.cpp
@@ -79,7 +79,7 @@ protected:
fPaths.push_back().lineTo(100 * SK_Scalar1, SK_Scalar1);
fPaths.back().lineTo(98 * SK_Scalar1, 100 * SK_Scalar1);
fPaths.back().lineTo(3 * SK_Scalar1, 96 * SK_Scalar1);
-
+
/*
It turns out arcTos are not automatically marked as convex and they
may in fact be ever so slightly concave.
@@ -108,6 +108,15 @@ protected:
fPaths.back().cubicTo(50 * SK_Scalar1, 50 * SK_Scalar1,
50 * SK_Scalar1, 50 * SK_Scalar1,
50 * SK_Scalar1, 50 * SK_Scalar1);
+ // moveTo only paths
+ fPaths.push_back().moveTo(0, 0);
+ fPaths.back().moveTo(0, 0);
+ fPaths.back().moveTo(SK_Scalar1, SK_Scalar1);
+ fPaths.back().moveTo(SK_Scalar1, SK_Scalar1);
+ fPaths.back().moveTo(10 * SK_Scalar1, 10 * SK_Scalar1);
+
+ fPaths.push_back().moveTo(0, 0);
+ fPaths.back().moveTo(0, 0);
// line degenerate
fPaths.push_back().lineTo(100 * SK_Scalar1, 100 * SK_Scalar1);