Make GrAAConvexPathRender support paths with > 64K verts.
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/15120004
git-svn-id: http://skia.googlecode.com/svn/trunk@9118 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gm/convexpaths.cpp b/gm/convexpaths.cpp
index 2c4753d..a354bd4 100644
--- a/gm/convexpaths.cpp
+++ b/gm/convexpaths.cpp
@@ -120,12 +120,30 @@
20 * SK_Scalar1, 40 * SK_Scalar1,
SkPath::kCCW_Direction);
+ // large number of points
+ enum {
+ kLength = 100,
+ kPtsPerSide = (1 << 12),
+ };
+ fPaths.push_back().moveTo(0, 0);
+ for (int i = 1; i < kPtsPerSide; ++i) { // skip the first point due to moveTo.
+ fPaths.back().lineTo(kLength * SkIntToScalar(i) / kPtsPerSide, 0);
+ }
+ for (int i = 0; i < kPtsPerSide; ++i) {
+ fPaths.back().lineTo(kLength, kLength * SkIntToScalar(i) / kPtsPerSide);
+ }
+ for (int i = kPtsPerSide; i > 0; --i) {
+ fPaths.back().lineTo(kLength * SkIntToScalar(i) / kPtsPerSide, kLength);
+ }
+ for (int i = kPtsPerSide; i > 0; --i) {
+ fPaths.back().lineTo(0, kLength * SkIntToScalar(i) / kPtsPerSide);
+ }
+
// shallow diagonals
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.
//fPaths.push_back().arcTo(SkRect::MakeXYWH(0, 0,