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

Side by Side Diff: gm/testimagefilters.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 | « gm/spritebitmap.cpp ('k') | include/effects/SkBlurImageFilter.h » ('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 2011 Google Inc. 2 * Copyright 2011 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 7
8 #include "gm.h" 8 #include "gm.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkColorFilter.h" 10 #include "SkColorFilter.h"
(...skipping 17 matching lines...) Expand all
28 static sk_sp<SkImageFilter> make1() { 28 static sk_sp<SkImageFilter> make1() {
29 return SkOffsetImageFilter::Make(SkIntToScalar(16), SkIntToScalar(16), nullp tr); 29 return SkOffsetImageFilter::Make(SkIntToScalar(16), SkIntToScalar(16), nullp tr);
30 } 30 }
31 31
32 static sk_sp<SkImageFilter> make2() { 32 static sk_sp<SkImageFilter> make2() {
33 sk_sp<SkColorFilter> cf(SkColorFilter::MakeModeFilter(SK_ColorBLUE, SkXfermo de::kSrcIn_Mode)); 33 sk_sp<SkColorFilter> cf(SkColorFilter::MakeModeFilter(SK_ColorBLUE, SkXfermo de::kSrcIn_Mode));
34 return sk_sp<SkImageFilter>(SkColorFilterImageFilter::Create(cf.get())); 34 return sk_sp<SkImageFilter>(SkColorFilterImageFilter::Create(cf.get()));
35 } 35 }
36 36
37 static sk_sp<SkImageFilter> make3() { 37 static sk_sp<SkImageFilter> make3() {
38 return sk_sp<SkImageFilter>(SkBlurImageFilter::Create(8, 0)); 38 return SkBlurImageFilter::Make(8, 0, nullptr);
39 } 39 }
40 40
41 static sk_sp<SkImageFilter> make4() { 41 static sk_sp<SkImageFilter> make4() {
42 sk_sp<SkImageFilter> outer(SkOffsetImageFilter::Make(SkIntToScalar(16), 42 sk_sp<SkImageFilter> outer(SkOffsetImageFilter::Make(SkIntToScalar(16),
43 SkIntToScalar(16), 43 SkIntToScalar(16),
44 nullptr)); 44 nullptr));
45 sk_sp<SkImageFilter> inner(SkDownSampleImageFilter::Create(SK_Scalar1 / 5)); 45 sk_sp<SkImageFilter> inner(SkDownSampleImageFilter::Create(SK_Scalar1 / 5));
46 return SkComposeImageFilter::Make(std::move(outer), std::move(inner)); 46 return SkComposeImageFilter::Make(std::move(outer), std::move(inner));
47 } 47 }
48 48
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 } 134 }
135 135
136 private: 136 private:
137 typedef GM INHERITED; 137 typedef GM INHERITED;
138 }; 138 };
139 139
140 ////////////////////////////////////////////////////////////////////////////// 140 //////////////////////////////////////////////////////////////////////////////
141 141
142 DEF_GM( return new TestImageFiltersGM; ) 142 DEF_GM( return new TestImageFiltersGM; )
OLDNEW
« no previous file with comments | « gm/spritebitmap.cpp ('k') | include/effects/SkBlurImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698