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 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 if (R(2) == 1) { | 699 if (R(2) == 1) { |
700 filter = SkImageSource::Make(std::move(image), | 700 filter = SkImageSource::Make(std::move(image), |
701 make_rect(), | 701 make_rect(), |
702 make_rect(), | 702 make_rect(), |
703 kHigh_SkFilterQuality); | 703 kHigh_SkFilterQuality); |
704 } else { | 704 } else { |
705 filter = SkImageSource::Make(std::move(image)); | 705 filter = SkImageSource::Make(std::move(image)); |
706 } | 706 } |
707 break; | 707 break; |
708 } | 708 } |
709 case DISPLACE: | 709 case DISPLACE: { |
710 filter = SkDisplacementMapEffect::Make(make_channel_selector_type(), | 710 sk_sp<SkImageFilter> subFilter1(make_image_filter(false)); |
711 make_channel_selector_type(), | 711 sk_sp<SkImageFilter> subFilter2(make_image_filter()); |
712 make_scalar(), | 712 |
713 make_image_filter(false), | 713 filter = sk_sp<SkImageFilter>(SkDisplacementMapEffect::Create(make_chann
el_selector_type(), |
714 make_image_filter()); | 714 make_chann
el_selector_type(), |
| 715 make_scala
r(), |
| 716 subFilter1
.get(), |
| 717 subFilter2
.get())); |
715 break; | 718 break; |
| 719 } |
716 case TILE: { | 720 case TILE: { |
717 sk_sp<SkImageFilter> subFilter(make_image_filter(false)); | 721 sk_sp<SkImageFilter> subFilter(make_image_filter(false)); |
718 | 722 |
719 filter = sk_sp<SkImageFilter>(SkTileImageFilter::Create(make_rect(), | 723 filter = sk_sp<SkImageFilter>(SkTileImageFilter::Create(make_rect(), |
720 make_rect(), | 724 make_rect(), |
721 subFilter.get())
); | 725 subFilter.get())
); |
722 break; | 726 break; |
723 } | 727 } |
724 case PICTURE: { | 728 case PICTURE: { |
725 SkRTreeFactory factory; | 729 SkRTreeFactory factory; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
786 DEF_FUZZ(SerializedImageFilter, f) { | 790 DEF_FUZZ(SerializedImageFilter, f) { |
787 fuzz = f; | 791 fuzz = f; |
788 SkImageFilter* filter = make_serialized_image_filter(); | 792 SkImageFilter* filter = make_serialized_image_filter(); |
789 | 793 |
790 SkPaint paint; | 794 SkPaint paint; |
791 SkSafeUnref(paint.setImageFilter(filter)); | 795 SkSafeUnref(paint.setImageFilter(filter)); |
792 SkBitmap bitmap; | 796 SkBitmap bitmap; |
793 SkCanvas canvas(bitmap); | 797 SkCanvas canvas(bitmap); |
794 drawClippedBitmap(&canvas, 0, 0, paint); | 798 drawClippedBitmap(&canvas, 0, 0, paint); |
795 } | 799 } |
OLD | NEW |