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

Side by Side Diff: gm/filterfastbounds.cpp

Issue 1842193002: Update SkOffsetImageFilter 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 | « bench/BlurImageFilterBench.cpp ('k') | gm/imagefiltersclipped.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 "SkBlurImageFilter.h" 9 #include "SkBlurImageFilter.h"
10 #include "SkDropShadowImageFilter.h" 10 #include "SkDropShadowImageFilter.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 add_paint(dsif, paints); 143 add_paint(dsif, paints);
144 } 144 }
145 145
146 { 146 {
147 SkAutoTUnref<SkImageFilter> bif(SkBlurImageFilter::Create(3, 3, source)) ; 147 SkAutoTUnref<SkImageFilter> bif(SkBlurImageFilter::Create(3, 3, source)) ;
148 148
149 add_paint(bif, paints); 149 add_paint(bif, paints);
150 } 150 }
151 151
152 { 152 {
153 SkAutoTUnref<SkImageFilter> oif(SkOffsetImageFilter::Create(15, 15, sour ce)); 153 sk_sp<SkImageFilter> oif(SkOffsetImageFilter::Make(15, 15,
154 sk_ref_sp<SkImageFilt er>(source)));
154 155
155 add_paint(oif, paints); 156 add_paint(oif.get(), paints);
156 } 157 }
157 } 158 }
158 159
159 // This GM visualizes the fast bounds for various combinations of geometry 160 // This GM visualizes the fast bounds for various combinations of geometry
160 // and image filter 161 // and image filter
161 class ImageFilterFastBoundGM : public GM { 162 class ImageFilterFastBoundGM : public GM {
162 public: 163 public:
163 ImageFilterFastBoundGM() { 164 ImageFilterFastBoundGM() {
164 this->setBGColor(sk_tool_utils::color_to_565(0xFFCCCCCC)); 165 this->setBGColor(sk_tool_utils::color_to_565(0xFFCCCCCC));
165 } 166 }
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 } 328 }
328 329
329 private: 330 private:
330 typedef GM INHERITED; 331 typedef GM INHERITED;
331 }; 332 };
332 333
333 ////////////////////////////////////////////////////////////////////////////// 334 //////////////////////////////////////////////////////////////////////////////
334 335
335 DEF_GM(return new ImageFilterFastBoundGM;) 336 DEF_GM(return new ImageFilterFastBoundGM;)
336 } 337 }
OLDNEW
« no previous file with comments | « bench/BlurImageFilterBench.cpp ('k') | gm/imagefiltersclipped.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698