Index: tests/PathTest.cpp |
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp |
index 3de10cb10642696b504ee605f6299520ee2edbd4..e265d317cadd87d0cad7a047576036cc2c036042 100644 |
--- a/tests/PathTest.cpp |
+++ b/tests/PathTest.cpp |
@@ -1151,6 +1151,23 @@ static void test_convexity2(skiatest::Reporter* reporter) { |
dent.close(); |
check_convexity(reporter, dent, SkPath::kConcave_Convexity); |
check_direction(reporter, dent, SkPath::kCW_Direction); |
+ |
+ // http://skbug.com/2235 |
+ SkPath strokedSin; |
+ for (int i = 0; i < 2000; i++) { |
+ SkScalar x = SkIntToScalar(i) / 2; |
+ SkScalar y = 500 - (x + SkScalarSin(x / 100) * 40) / 3; |
+ if (0 == i) { |
+ strokedSin.moveTo(x, y); |
+ } else { |
+ strokedSin.lineTo(x, y); |
+ } |
+ } |
+ SkStrokeRec stroke(SkStrokeRec::kFill_InitStyle); |
+ stroke.setStrokeStyle(2 * SK_Scalar1); |
+ stroke.applyToPath(&strokedSin, strokedSin); |
+ check_convexity(reporter, strokedSin, SkPath::kConcave_Convexity); |
+ check_direction(reporter, strokedSin, kDontCheckDir); |
} |
static void check_convex_bounds(skiatest::Reporter* reporter, const SkPath& p, |