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

Side by Side Diff: fuzz/FilterFuzz.cpp

Issue 1884253004: Revert of Update DisplacementMapEffect to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « bench/ImageFilterDAGBench.cpp ('k') | gm/displacement.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 "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
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
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 }
OLDNEW
« no previous file with comments | « bench/ImageFilterDAGBench.cpp ('k') | gm/displacement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698