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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 paint.setStrokeMiter(make_scalar()); | 505 paint.setStrokeMiter(make_scalar()); |
506 paint.setStrokeCap(make_paint_cap()); | 506 paint.setStrokeCap(make_paint_cap()); |
507 paint.setStrokeJoin(make_paint_join()); | 507 paint.setStrokeJoin(make_paint_join()); |
508 paint.setColorFilter(make_color_filter()); | 508 paint.setColorFilter(make_color_filter()); |
509 paint.setXfermodeMode(make_xfermode()); | 509 paint.setXfermodeMode(make_xfermode()); |
510 paint.setPathEffect(make_path_effect()); | 510 paint.setPathEffect(make_path_effect()); |
511 paint.setMaskFilter(make_mask_filter()); | 511 paint.setMaskFilter(make_mask_filter()); |
512 | 512 |
513 if (false) { | 513 if (false) { |
514 // our validating buffer does not support typefaces yet, so skip this fo
r now | 514 // our validating buffer does not support typefaces yet, so skip this fo
r now |
515 paint.setTypeface(SkTypeface::MakeFromName(make_font_name().c_str(),make
_typeface_style())); | 515 SkAutoTUnref<SkTypeface> typeface( |
| 516 SkTypeface::CreateFromName(make_font_name().c_str(), make_
typeface_style())); |
| 517 paint.setTypeface(typeface); |
516 } | 518 } |
517 | 519 |
518 SkLayerRasterizer::Builder rasterizerBuilder; | 520 SkLayerRasterizer::Builder rasterizerBuilder; |
519 SkPaint paintForRasterizer; | 521 SkPaint paintForRasterizer; |
520 if (R(2) == 1) { | 522 if (R(2) == 1) { |
521 paintForRasterizer = make_paint(); | 523 paintForRasterizer = make_paint(); |
522 } | 524 } |
523 rasterizerBuilder.addLayer(paintForRasterizer); | 525 rasterizerBuilder.addLayer(paintForRasterizer); |
524 paint.setRasterizer(rasterizerBuilder.detach()); | 526 paint.setRasterizer(rasterizerBuilder.detach()); |
525 paint.setImageFilter(make_image_filter()); | 527 paint.setImageFilter(make_image_filter()); |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
779 DEF_FUZZ(SerializedImageFilter, f) { | 781 DEF_FUZZ(SerializedImageFilter, f) { |
780 fuzz = f; | 782 fuzz = f; |
781 SkImageFilter* filter = make_serialized_image_filter(); | 783 SkImageFilter* filter = make_serialized_image_filter(); |
782 | 784 |
783 SkPaint paint; | 785 SkPaint paint; |
784 SkSafeUnref(paint.setImageFilter(filter)); | 786 SkSafeUnref(paint.setImageFilter(filter)); |
785 SkBitmap bitmap; | 787 SkBitmap bitmap; |
786 SkCanvas canvas(bitmap); | 788 SkCanvas canvas(bitmap); |
787 drawClippedBitmap(&canvas, 0, 0, paint); | 789 drawClippedBitmap(&canvas, 0, 0, paint); |
788 } | 790 } |
OLD | NEW |