diff options
author | 2016-02-20 14:18:27 -0800 | |
---|---|---|
committer | 2016-02-20 14:18:27 -0800 | |
commit | 00bea4ad310c4ec4dd95809b47ce3fbfa8fd0e1e (patch) | |
tree | 8c7e11efbc4c108252a219c763010d5035b10846 /samplecode | |
parent | f5d4746ad73ef5eabc927d3d988bb9ee97c77921 (diff) |
fix misc asserts and checks found by fuzzer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1713383002
TBR=robertphilips
Review URL: https://codereview.chromium.org/1713383002
Diffstat (limited to 'samplecode')
-rw-r--r-- | samplecode/SampleFilterFuzz.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/samplecode/SampleFilterFuzz.cpp b/samplecode/SampleFilterFuzz.cpp index f8ceed452c..45b43df953 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) { |