diff options
author | Ben Wagner <bungeman@google.com> | 2017-08-07 09:56:21 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-08-08 15:27:19 +0000 |
commit | c6c10b45188f0921c9451644b61b072e3a36ee12 (patch) | |
tree | 34c7ae0b90be040daa5523657fec04d6771f9472 /fuzz | |
parent | 0ac06e47269a40c177747310a613d213c95d1d6d (diff) |
Remove SkTypeface::Style from fuzzers and lua.
Change-Id: I53be039e21a4c11ec3a4bc54c1424cd3e15afc6a
Reviewed-on: https://skia-review.googlesource.com/31643
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'fuzz')
-rw-r--r-- | fuzz/FilterFuzz.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fuzz/FilterFuzz.cpp b/fuzz/FilterFuzz.cpp index 015a0a06aa..41e2c7276f 100644 --- a/fuzz/FilterFuzz.cpp +++ b/fuzz/FilterFuzz.cpp @@ -23,6 +23,7 @@ #include "SkDropShadowImageFilter.h" #include "SkEmbossMaskFilter.h" #include "SkFlattenableSerialization.h" +#include "SkFontStyle.h" #include "SkImageSource.h" #include "SkLayerRasterizer.h" #include "SkLightingImageFilter.h" @@ -182,9 +183,13 @@ static SkFilterQuality make_filter_quality() { } static SkFontStyle make_typeface_style() { - uint8_t i; - fuzz->nextRange(&i, 0, (uint8_t)SkTypeface::kBoldItalic); - return SkFontStyle::FromOldStyle(i); + uint16_t weight; + fuzz->nextRange(&weight, SkFontStyle::kInvisible_Weight, SkFontStyle::kExtraBlack_Weight); + uint8_t width; + fuzz->nextRange(&width, SkFontStyle::kUltraCondensed_Width, SkFontStyle::kUltraExpanded_Width); + uint8_t slant; + fuzz->nextRange(&slant, SkFontStyle::kUpright_Slant, SkFontStyle::kOblique_Slant); + return SkFontStyle(weight, width, static_cast<SkFontStyle::Slant>(slant)); } static SkPath1DPathEffect::Style make_path_1d_path_effect_style() { |