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

Side by Side Diff: gm/imagefilterscropexpand.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/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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 SkRect rect = cropRect.rect(); 73 SkRect rect = cropRect.rect();
74 rect.outset(SkIntToScalar(outset), 74 rect.outset(SkIntToScalar(outset),
75 SkIntToScalar(outset)); 75 SkIntToScalar(outset));
76 SkImageFilter::CropRect bigRect(rect, SkImageFilter::CropRect::kHasA ll_CropEdge); 76 SkImageFilter::CropRect bigRect(rect, SkImageFilter::CropRect::kHasA ll_CropEdge);
77 77
78 Draw(canvas, checkerboard, rect, 78 Draw(canvas, checkerboard, rect,
79 sk_sp<SkImageFilter>(SkColorFilterImageFilter::Create(cfAlphaTr ans.get(), 79 sk_sp<SkImageFilter>(SkColorFilterImageFilter::Create(cfAlphaTr ans.get(),
80 noopCropp ed.get(), 80 noopCropp ed.get(),
81 &bigRect) )); 81 &bigRect) ));
82 82
83 Draw(canvas, checkerboard, rect, 83 Draw(canvas, checkerboard, rect, SkBlurImageFilter::Make(0.3f, 0.3f,
84 sk_sp<SkImageFilter>(SkBlurImageFilter::Create(0.3f, 0.3f, 84 noopCropped ,
85 noopCropped.get( ), 85 &bigRect));
86 &bigRect)));
87 86
88 Draw(canvas, checkerboard, rect, 87 Draw(canvas, checkerboard, rect, SkBlurImageFilter::Make(8.0f, 8.0f,
89 sk_sp<SkImageFilter>(SkBlurImageFilter::Create(8.0f, 8.0f, 88 noopCropped ,
90 noopCropped.get( ), 89 &bigRect));
91 &bigRect)));
92 90
93 Draw(canvas, checkerboard, rect, 91 Draw(canvas, checkerboard, rect,
94 sk_sp<SkImageFilter>(SkDilateImageFilter::Create(2, 2, 92 sk_sp<SkImageFilter>(SkDilateImageFilter::Create(2, 2,
95 noopCropped.ge t(), 93 noopCropped.ge t(),
96 &bigRect))); 94 &bigRect)));
97 95
98 Draw(canvas, checkerboard, rect, 96 Draw(canvas, checkerboard, rect,
99 sk_sp<SkImageFilter>(SkErodeImageFilter::Create(2, 2, 97 sk_sp<SkImageFilter>(SkErodeImageFilter::Create(2, 2,
100 noopCropped.get (), 98 noopCropped.get (),
101 &bigRect))); 99 &bigRect)));
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 191
194 canvas->translate(SkIntToScalar(80), 0); 192 canvas->translate(SkIntToScalar(80), 0);
195 } 193 }
196 194
197 typedef GM INHERITED; 195 typedef GM INHERITED;
198 }; 196 };
199 197
200 /////////////////////////////////////////////////////////////////////////////// 198 ///////////////////////////////////////////////////////////////////////////////
201 199
202 DEF_GM( return new ImageFiltersCropExpandGM; ) 200 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