aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathTest.cpp
diff options
context:
space:
mode:
authorGravatar liyuqian <liyuqian@google.com>2016-11-09 11:18:30 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-11-09 11:18:30 -0800
commitc78eff97549e8e346394d3e228395ceb8a467b35 (patch)
tree4a0e868f2c9372b37fb63d5093a9078ea832ec50 /tests/PathTest.cpp
parent40c07dc797ada471ba89cb81acc4b7b93f7374d7 (diff)
Do not call blitV with 0 height
This is causing SkAAClipBlitter to crash. BUG=chromium:662952 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2485243002 Review-Url: https://codereview.chromium.org/2485243002
Diffstat (limited to 'tests/PathTest.cpp')
-rw-r--r--tests/PathTest.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index a3fcb3a574..b79b5cccd9 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -4244,6 +4244,22 @@ static void test_crbug_629455(skiatest::Reporter* reporter) {
surface->getCanvas()->drawPath(path, paint);
}
+static void test_fuzz_crbug_662952(skiatest::Reporter* reporter) {
+ SkPath path;
+ path.moveTo(SkBits2Float(0x4109999a), SkBits2Float(0x411c0000)); // 8.6f, 9.75f
+ path.lineTo(SkBits2Float(0x410a6666), SkBits2Float(0x411c0000)); // 8.65f, 9.75f
+ path.lineTo(SkBits2Float(0x410a6666), SkBits2Float(0x411e6666)); // 8.65f, 9.9f
+ path.lineTo(SkBits2Float(0x4109999a), SkBits2Float(0x411e6666)); // 8.6f, 9.9f
+ path.lineTo(SkBits2Float(0x4109999a), SkBits2Float(0x411c0000)); // 8.6f, 9.75f
+ path.close();
+
+ auto surface = SkSurface::MakeRasterN32Premul(100, 100);
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ surface->getCanvas()->clipPath(path, true);
+ surface->getCanvas()->drawRectCoords(0, 0, 100, 100, paint);
+}
+
static void test_interp(skiatest::Reporter* reporter) {
SkPath p1, p2, out;
REPORTER_ASSERT(reporter, p1.isInterpolatable(p2));
@@ -4298,6 +4314,7 @@ DEF_TEST(Paths, reporter) {
test_crbug_629455(reporter);
test_fuzz_crbug_627414(reporter);
test_path_crbug364224();
+ test_fuzz_crbug_662952(reporter);
SkTSize<SkScalar>::Make(3,4);