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

Side by Side Diff: samplecode/SampleFilterFuzz.cpp

Issue 1852743002: Update SkBlurImageFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT & address code review comments 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/SkBlurImageFilter.h ('k') | src/effects/SkBlurImageFilter.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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 case LUT3D: { 576 case LUT3D: {
577 int cubeDimension; 577 int cubeDimension;
578 sk_sp<SkData> lut3D(make_3Dlut(&cubeDimension, (R(2) == 1), (R(2) == 1), (R(2) == 1))); 578 sk_sp<SkData> lut3D(make_3Dlut(&cubeDimension, (R(2) == 1), (R(2) == 1), (R(2) == 1)));
579 sk_sp<SkColorFilter> cf(SkColorCubeFilter::Make(lut3D, cubeDimension)); 579 sk_sp<SkColorFilter> cf(SkColorCubeFilter::Make(lut3D, cubeDimension));
580 sk_sp<SkImageFilter> subFilter(make_image_filter()); 580 sk_sp<SkImageFilter> subFilter(make_image_filter());
581 filter = cf ? sk_sp<SkImageFilter>(SkColorFilterImageFilter::Create(cf.g et(), 581 filter = cf ? sk_sp<SkImageFilter>(SkColorFilterImageFilter::Create(cf.g et(),
582 subF ilter.get())) 582 subF ilter.get()))
583 : nullptr; 583 : nullptr;
584 break; 584 break;
585 } 585 }
586 case BLUR: { 586 case BLUR:
587 sk_sp<SkImageFilter> subFilter(make_image_filter()); 587 filter = SkBlurImageFilter::Make(make_scalar(true),
588 filter = sk_sp<SkImageFilter>(SkBlurImageFilter::Create(make_scalar(true ), 588 make_scalar(true),
589 make_scalar(true ), 589 make_image_filter());
590 subFilter.get()) );
591 break; 590 break;
592 }
593 case MAGNIFIER: 591 case MAGNIFIER:
594 filter = sk_sp<SkImageFilter>(SkMagnifierImageFilter::Create(make_rect() , 592 filter = sk_sp<SkImageFilter>(SkMagnifierImageFilter::Create(make_rect() ,
595 make_scalar (true))); 593 make_scalar (true)));
596 break; 594 break;
597 case DOWN_SAMPLE: 595 case DOWN_SAMPLE:
598 filter = sk_sp<SkImageFilter>(SkDownSampleImageFilter::Create(make_scala r())); 596 filter = sk_sp<SkImageFilter>(SkDownSampleImageFilter::Create(make_scala r()));
599 break; 597 break;
600 case XFERMODE: { 598 case XFERMODE: {
601 sk_sp<SkImageFilter> subFilter1(make_image_filter()); 599 sk_sp<SkImageFilter> subFilter1(make_image_filter());
602 sk_sp<SkImageFilter> subFilter2(make_image_filter()); 600 sk_sp<SkImageFilter> subFilter2(make_image_filter());
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 } 865 }
868 866
869 private: 867 private:
870 typedef SkView INHERITED; 868 typedef SkView INHERITED;
871 }; 869 };
872 870
873 ////////////////////////////////////////////////////////////////////////////// 871 //////////////////////////////////////////////////////////////////////////////
874 872
875 static SkView* MyFactory() { return new ImageFilterFuzzView; } 873 static SkView* MyFactory() { return new ImageFilterFuzzView; }
876 static SkViewRegister reg(MyFactory); 874 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « include/effects/SkBlurImageFilter.h ('k') | src/effects/SkBlurImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698