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

Side by Side Diff: fuzz/FilterFuzz.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 | « 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 sk_sp<SkImageFilter> subFilter1(make_image_filter(false)); 710 filter = SkDisplacementMapEffect::Make(make_channel_selector_type(),
711 sk_sp<SkImageFilter> subFilter2(make_image_filter()); 711 make_channel_selector_type(),
712 712 make_scalar(),
713 filter = sk_sp<SkImageFilter>(SkDisplacementMapEffect::Create(make_chann el_selector_type(), 713 make_image_filter(false),
714 make_chann el_selector_type(), 714 make_image_filter());
715 make_scala r(),
716 subFilter1 .get(),
717 subFilter2 .get()));
718 break; 715 break;
719 }
720 case TILE: { 716 case TILE: {
721 sk_sp<SkImageFilter> subFilter(make_image_filter(false)); 717 sk_sp<SkImageFilter> subFilter(make_image_filter(false));
722 718
723 filter = sk_sp<SkImageFilter>(SkTileImageFilter::Create(make_rect(), 719 filter = sk_sp<SkImageFilter>(SkTileImageFilter::Create(make_rect(),
724 make_rect(), 720 make_rect(),
725 subFilter.get()) ); 721 subFilter.get()) );
726 break; 722 break;
727 } 723 }
728 case PICTURE: { 724 case PICTURE: {
729 SkRTreeFactory factory; 725 SkRTreeFactory factory;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 DEF_FUZZ(SerializedImageFilter, f) { 786 DEF_FUZZ(SerializedImageFilter, f) {
791 fuzz = f; 787 fuzz = f;
792 SkImageFilter* filter = make_serialized_image_filter(); 788 SkImageFilter* filter = make_serialized_image_filter();
793 789
794 SkPaint paint; 790 SkPaint paint;
795 SkSafeUnref(paint.setImageFilter(filter)); 791 SkSafeUnref(paint.setImageFilter(filter));
796 SkBitmap bitmap; 792 SkBitmap bitmap;
797 SkCanvas canvas(bitmap); 793 SkCanvas canvas(bitmap);
798 drawClippedBitmap(&canvas, 0, 0, paint); 794 drawClippedBitmap(&canvas, 0, 0, paint);
799 } 795 }
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