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

Side by Side Diff: gm/imagefilterscropexpand.cpp

Issue 1861843002: Update DropShadowImageFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address code review issues 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/imagefiltersclipped.cpp ('k') | gm/imagefiltersscaled.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 2014 Google Inc. 2 * Copyright 2014 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 Draw(canvas, checkerboard, rect, SkDilateImageFilter::Make(2, 2, 90 Draw(canvas, checkerboard, rect, SkDilateImageFilter::Make(2, 2,
91 noopCropp ed, 91 noopCropp ed,
92 &bigRect) ); 92 &bigRect) );
93 93
94 Draw(canvas, checkerboard, rect, SkErodeImageFilter::Make(2, 2, 94 Draw(canvas, checkerboard, rect, SkErodeImageFilter::Make(2, 2,
95 noopCroppe d, 95 noopCroppe d,
96 &bigRect)) ; 96 &bigRect)) ;
97 97
98 Draw(canvas, checkerboard, rect, 98 Draw(canvas, checkerboard, rect,
99 sk_sp<SkImageFilter>(SkDropShadowImageFilter::Create( 99 SkDropShadowImageFilter::Make(
100 SkIntToScalar(10), 100 SkIntToScalar(10),
101 SkIntToScalar(10), 101 SkIntToScalar(10),
102 SkIntToScalar(3), 102 SkIntToScalar(3),
103 SkIntToScalar(3), 103 SkIntToScalar(3),
104 SK_ColorBLUE, 104 SK_ColorBLUE,
105 SkDropShadowImageFilter::kDrawShadowAndForeg round_ShadowMode, 105 SkDropShadowImageFilter::kDrawShadowAndForeg round_ShadowMode,
106 noopCropped.get(), 106 noopCropped,
107 &bigRect))); 107 &bigRect));
108 108
109 Draw(canvas, checkerboard, rect, 109 Draw(canvas, checkerboard, rect,
110 sk_sp<SkImageFilter>(SkDisplacementMapEffect::Create( 110 sk_sp<SkImageFilter>(SkDisplacementMapEffect::Create(
111 SkDisplacementMapEffect::kR_Chan nelSelectorType, 111 SkDisplacementMapEffect::kR_Chan nelSelectorType,
112 SkDisplacementMapEffect::kR_Chan nelSelectorType, 112 SkDisplacementMapEffect::kR_Chan nelSelectorType,
113 SkIntToScalar(12), 113 SkIntToScalar(12),
114 gradientCircleSource.get(), 114 gradientCircleSource.get(),
115 noopCropped.get(), 115 noopCropped.get(),
116 &bigRect))); 116 &bigRect)));
117 117
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 188
189 canvas->translate(SkIntToScalar(80), 0); 189 canvas->translate(SkIntToScalar(80), 0);
190 } 190 }
191 191
192 typedef GM INHERITED; 192 typedef GM INHERITED;
193 }; 193 };
194 194
195 /////////////////////////////////////////////////////////////////////////////// 195 ///////////////////////////////////////////////////////////////////////////////
196 196
197 DEF_GM( return new ImageFiltersCropExpandGM; ) 197 DEF_GM( return new ImageFiltersCropExpandGM; )
OLDNEW
« no previous file with comments | « gm/imagefiltersclipped.cpp ('k') | gm/imagefiltersscaled.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698