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

Side by Side Diff: samplecode/SampleFilterFuzz.cpp

Issue 1877783003: Update DisplacementMapEffect to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix bug Created 4 years, 8 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 | « include/effects/SkDisplacementMapEffect.h ('k') | src/effects/SkDisplacementMapEffect.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 "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
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
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);
OLDNEW
« no previous file with comments | « include/effects/SkDisplacementMapEffect.h ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698