| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 #include "Fuzz.h" | 7 #include "Fuzz.h" |
| 8 #include "Sk1DPathEffect.h" | 8 #include "Sk1DPathEffect.h" |
| 9 #include "Sk2DPathEffect.h" | 9 #include "Sk2DPathEffect.h" |
| 10 #include "SkAlphaThresholdFilter.h" | 10 #include "SkAlphaThresholdFilter.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 } | 188 } |
| 189 | 189 |
| 190 static SkBlurMaskFilter::BlurFlags make_blur_mask_filter_flag() { | 190 static SkBlurMaskFilter::BlurFlags make_blur_mask_filter_flag() { |
| 191 return static_cast<SkBlurMaskFilter::BlurFlags>(R(SkBlurMaskFilter::kAll_Blu
rFlag+1)); | 191 return static_cast<SkBlurMaskFilter::BlurFlags>(R(SkBlurMaskFilter::kAll_Blu
rFlag+1)); |
| 192 } | 192 } |
| 193 | 193 |
| 194 static SkFilterQuality make_filter_quality() { | 194 static SkFilterQuality make_filter_quality() { |
| 195 return static_cast<SkFilterQuality>(R(kHigh_SkFilterQuality+1)); | 195 return static_cast<SkFilterQuality>(R(kHigh_SkFilterQuality+1)); |
| 196 } | 196 } |
| 197 | 197 |
| 198 static SkTypeface::Style make_typeface_style() { | 198 static SkFontStyle make_typeface_style() { |
| 199 return static_cast<SkTypeface::Style>(R(SkTypeface::kBoldItalic+1)); | 199 return SkFontStyle::FromOldStyle(R(SkTypeface::kBoldItalic+1)); |
| 200 } | 200 } |
| 201 | 201 |
| 202 static SkPath1DPathEffect::Style make_path_1d_path_effect_style() { | 202 static SkPath1DPathEffect::Style make_path_1d_path_effect_style() { |
| 203 return static_cast<SkPath1DPathEffect::Style>(R((int)SkPath1DPathEffect::kLa
stEnum_Style + 1)); | 203 return static_cast<SkPath1DPathEffect::Style>(R((int)SkPath1DPathEffect::kLa
stEnum_Style + 1)); |
| 204 } | 204 } |
| 205 | 205 |
| 206 static SkColor make_color() { | 206 static SkColor make_color() { |
| 207 return (R(2) == 1) ? 0xFFC0F0A0 : 0xFF000090; | 207 return (R(2) == 1) ? 0xFFC0F0A0 : 0xFF000090; |
| 208 } | 208 } |
| 209 | 209 |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 DEF_FUZZ(SerializedImageFilter, f) { | 779 DEF_FUZZ(SerializedImageFilter, f) { |
| 780 fuzz = f; | 780 fuzz = f; |
| 781 SkImageFilter* filter = make_serialized_image_filter(); | 781 SkImageFilter* filter = make_serialized_image_filter(); |
| 782 | 782 |
| 783 SkPaint paint; | 783 SkPaint paint; |
| 784 SkSafeUnref(paint.setImageFilter(filter)); | 784 SkSafeUnref(paint.setImageFilter(filter)); |
| 785 SkBitmap bitmap; | 785 SkBitmap bitmap; |
| 786 SkCanvas canvas(bitmap); | 786 SkCanvas canvas(bitmap); |
| 787 drawClippedBitmap(&canvas, 0, 0, paint); | 787 drawClippedBitmap(&canvas, 0, 0, paint); |
| 788 } | 788 } |
| OLD | NEW |