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

Side by Side Diff: gm/imagefilterscropexpand.cpp

Issue 1860573002: Update SkMorphology ImageFilters to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT 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/imagefilterscropped.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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 &bigRect) )); 81 &bigRect) ));
82 82
83 Draw(canvas, checkerboard, rect, SkBlurImageFilter::Make(0.3f, 0.3f, 83 Draw(canvas, checkerboard, rect, SkBlurImageFilter::Make(0.3f, 0.3f,
84 noopCropped , 84 noopCropped ,
85 &bigRect)); 85 &bigRect));
86 86
87 Draw(canvas, checkerboard, rect, SkBlurImageFilter::Make(8.0f, 8.0f, 87 Draw(canvas, checkerboard, rect, SkBlurImageFilter::Make(8.0f, 8.0f,
88 noopCropped , 88 noopCropped ,
89 &bigRect)); 89 &bigRect));
90 90
91 Draw(canvas, checkerboard, rect, 91 Draw(canvas, checkerboard, rect, SkDilateImageFilter::Make(2, 2,
92 sk_sp<SkImageFilter>(SkDilateImageFilter::Create(2, 2, 92 noopCropp ed,
93 noopCropped.ge t(), 93 &bigRect) );
94 &bigRect)));
95 94
96 Draw(canvas, checkerboard, rect, 95 Draw(canvas, checkerboard, rect, SkErodeImageFilter::Make(2, 2,
97 sk_sp<SkImageFilter>(SkErodeImageFilter::Create(2, 2, 96 noopCroppe d,
98 noopCropped.get (), 97 &bigRect)) ;
99 &bigRect)));
100 98
101 Draw(canvas, checkerboard, rect, 99 Draw(canvas, checkerboard, rect,
102 sk_sp<SkImageFilter>(SkDropShadowImageFilter::Create( 100 sk_sp<SkImageFilter>(SkDropShadowImageFilter::Create(
103 SkIntToScalar(10), 101 SkIntToScalar(10),
104 SkIntToScalar(10), 102 SkIntToScalar(10),
105 SkIntToScalar(3), 103 SkIntToScalar(3),
106 SkIntToScalar(3), 104 SkIntToScalar(3),
107 SK_ColorBLUE, 105 SK_ColorBLUE,
108 SkDropShadowImageFilter::kDrawShadowAndForeg round_ShadowMode, 106 SkDropShadowImageFilter::kDrawShadowAndForeg round_ShadowMode,
109 noopCropped.get(), 107 noopCropped.get(),
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 189
192 canvas->translate(SkIntToScalar(80), 0); 190 canvas->translate(SkIntToScalar(80), 0);
193 } 191 }
194 192
195 typedef GM INHERITED; 193 typedef GM INHERITED;
196 }; 194 };
197 195
198 /////////////////////////////////////////////////////////////////////////////// 196 ///////////////////////////////////////////////////////////////////////////////
199 197
200 DEF_GM( return new ImageFiltersCropExpandGM; ) 198 DEF_GM( return new ImageFiltersCropExpandGM; )
OLDNEW
« no previous file with comments | « gm/imagefiltersclipped.cpp ('k') | gm/imagefilterscropped.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698