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 SkAutoTUnref<SkTypeface> typeface( | 515 paint.setTypeface(SkTypeface::MakeFromName(make_font_name().c_str(),make
_typeface_style())); |
516 SkTypeface::CreateFromName(make_font_name().c_str(), make_
typeface_style())); | |
517 paint.setTypeface(typeface); | |
518 } | 516 } |
519 | 517 |
520 SkLayerRasterizer::Builder rasterizerBuilder; | 518 SkLayerRasterizer::Builder rasterizerBuilder; |
521 SkPaint paintForRasterizer; | 519 SkPaint paintForRasterizer; |
522 if (R(2) == 1) { | 520 if (R(2) == 1) { |
523 paintForRasterizer = make_paint(); | 521 paintForRasterizer = make_paint(); |
524 } | 522 } |
525 rasterizerBuilder.addLayer(paintForRasterizer); | 523 rasterizerBuilder.addLayer(paintForRasterizer); |
526 paint.setRasterizer(rasterizerBuilder.detach()); | 524 paint.setRasterizer(rasterizerBuilder.detach()); |
527 paint.setImageFilter(make_image_filter()); | 525 paint.setImageFilter(make_image_filter()); |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
781 DEF_FUZZ(SerializedImageFilter, f) { | 779 DEF_FUZZ(SerializedImageFilter, f) { |
782 fuzz = f; | 780 fuzz = f; |
783 SkImageFilter* filter = make_serialized_image_filter(); | 781 SkImageFilter* filter = make_serialized_image_filter(); |
784 | 782 |
785 SkPaint paint; | 783 SkPaint paint; |
786 SkSafeUnref(paint.setImageFilter(filter)); | 784 SkSafeUnref(paint.setImageFilter(filter)); |
787 SkBitmap bitmap; | 785 SkBitmap bitmap; |
788 SkCanvas canvas(bitmap); | 786 SkCanvas canvas(bitmap); |
789 drawClippedBitmap(&canvas, 0, 0, paint); | 787 drawClippedBitmap(&canvas, 0, 0, paint); |
790 } | 788 } |
OLD | NEW |