Draw path onto a canvas when fuzzing
authorKevin Lubick <kjlubick@google.com>
Tue, 21 Feb 2017 14:37:48 +0000 (09:37 -0500)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Tue, 21 Feb 2017 14:42:50 +0000 (14:42 +0000)
BUG=skia:
NOTRY=true
TBR=jcgregorio@google.com

Change-Id: Icd6b1b884705f7599be23b5d6283adfcfcbe727b
Reviewed-on: https://skia-review.googlesource.com/8767
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>

fuzz/fuzz.cpp

index cc26b2d..eb0675a 100644 (file)
@@ -480,6 +480,8 @@ static void fuzz_path_deserialize(sk_sp<SkData> bytes) {
         SkDebugf("[terminated] Couldn't initialize SkPath.\n");
         return;
     }
+    auto s = SkSurface::MakeRasterN32Premul(1024, 1024);
+    s->getCanvas()->drawPath(path, SkPaint());
     SkDebugf("[terminated] Success! Initialized SkPath.\n");
 }