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 "SampleCode.h" | 7 #include "SampleCode.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 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 if (R(2) == 1) { | 702 if (R(2) == 1) { |
703 filter = SkImageSource::Make(std::move(image), | 703 filter = SkImageSource::Make(std::move(image), |
704 make_rect(), | 704 make_rect(), |
705 make_rect(), | 705 make_rect(), |
706 kHigh_SkFilterQuality); | 706 kHigh_SkFilterQuality); |
707 } else { | 707 } else { |
708 filter = SkImageSource::Make(std::move(image)); | 708 filter = SkImageSource::Make(std::move(image)); |
709 } | 709 } |
710 break; | 710 break; |
711 } | 711 } |
712 case DISPLACE: { | 712 case DISPLACE: |
713 sk_sp<SkImageFilter> subFilter1(make_image_filter(false)); | 713 filter = SkDisplacementMapEffect::Make(make_channel_selector_type(), |
714 sk_sp<SkImageFilter> subFilter2(make_image_filter()); | 714 make_channel_selector_type(), |
715 | 715 make_scalar(), |
716 filter = sk_sp<SkImageFilter>(SkDisplacementMapEffect::Create(make_chann
el_selector_type(), | 716 make_image_filter(false), |
717 make_chann
el_selector_type(), | 717 make_image_filter()); |
718 make_scala
r(), | |
719 subFilter1
.get(), | |
720 subFilter2
.get())); | |
721 break; | 718 break; |
722 } | |
723 case TILE: { | 719 case TILE: { |
724 sk_sp<SkImageFilter> subFilter(make_image_filter(false)); | 720 sk_sp<SkImageFilter> subFilter(make_image_filter(false)); |
725 | 721 |
726 filter = sk_sp<SkImageFilter>(SkTileImageFilter::Create(make_rect(), | 722 filter = sk_sp<SkImageFilter>(SkTileImageFilter::Create(make_rect(), |
727 make_rect(), | 723 make_rect(), |
728 subFilter.get())
); | 724 subFilter.get())
); |
729 break; | 725 break; |
730 } | 726 } |
731 case PICTURE: { | 727 case PICTURE: { |
732 SkRTreeFactory factory; | 728 SkRTreeFactory factory; |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 } | 836 } |
841 | 837 |
842 private: | 838 private: |
843 typedef SkView INHERITED; | 839 typedef SkView INHERITED; |
844 }; | 840 }; |
845 | 841 |
846 ////////////////////////////////////////////////////////////////////////////// | 842 ////////////////////////////////////////////////////////////////////////////// |
847 | 843 |
848 static SkView* MyFactory() { return new ImageFilterFuzzView; } | 844 static SkView* MyFactory() { return new ImageFilterFuzzView; } |
849 static SkViewRegister reg(MyFactory); | 845 static SkViewRegister reg(MyFactory); |
OLD | NEW |