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

Side by Side Diff: fuzz/FilterFuzz.cpp

Issue 1818043002: SkTypeface::MakeFromName to take SkFontStyle. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Android fix + nit fix Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « dm/DM.cpp ('k') | gm/all_bitmap_configs.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « dm/DM.cpp ('k') | gm/all_bitmap_configs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698