Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Unified Diff: samplecode/SampleFilterFuzz.cpp

Issue 1713383002: fix misc asserts and checks found by fuzzer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/effects/SkDashPathEffect.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleFilterFuzz.cpp
diff --git a/samplecode/SampleFilterFuzz.cpp b/samplecode/SampleFilterFuzz.cpp
index f8ceed452cd4bb4229b4748101057519266769f4..45b43df9536a69277d3690906816726725eb06a4 100644
--- a/samplecode/SampleFilterFuzz.cpp
+++ b/samplecode/SampleFilterFuzz.cpp
@@ -204,7 +204,7 @@ static SkTypeface::Style make_typeface_style() {
}
static SkPath1DPathEffect::Style make_path_1d_path_effect_style() {
- return static_cast<SkPath1DPathEffect::Style>(R(SkPath1DPathEffect::kStyleCount));
+ return static_cast<SkPath1DPathEffect::Style>(R((int)SkPath1DPathEffect::kMorph_Style + 1));
}
static SkColor make_color() {
@@ -529,7 +529,9 @@ static SkPaint make_paint() {
paint.setMaskFilter(make_mask_filter());
SkAutoTUnref<SkTypeface> typeface(
SkTypeface::CreateFromName(make_font_name().c_str(), make_typeface_style()));
+#if 0
paint.setTypeface(typeface);
+#endif
SkLayerRasterizer::Builder rasterizerBuilder;
SkPaint paintForRasterizer;
if (R(2) == 1) {
« no previous file with comments | « include/effects/SkDashPathEffect.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698