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

Side by Side Diff: gm/filterfastbounds.cpp

Issue 1882113002: Update TileImageFilter 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/bigtileimagefilter.cpp ('k') | gm/tileimagefilter.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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 sk_sp<SkImageFilter> rotMIF( 107 sk_sp<SkImageFilter> rotMIF(
108 SkImageFilter::MakeMatrixFilter(rot, kLow_SkFilterQuality, source)); 108 SkImageFilter::MakeMatrixFilter(rot, kLow_SkFilterQuality, source));
109 109
110 add_paint(paints, std::move(rotMIF)); 110 add_paint(paints, std::move(rotMIF));
111 } 111 }
112 112
113 { 113 {
114 SkRect src = SkRect::MakeXYWH(20, 20, 10, 10); 114 SkRect src = SkRect::MakeXYWH(20, 20, 10, 10);
115 SkRect dst = SkRect::MakeXYWH(30, 30, 30, 30); 115 SkRect dst = SkRect::MakeXYWH(30, 30, 30, 30);
116 sk_sp<SkImageFilter> tileIF(SkTileImageFilter::Create(src, dst, nullptr) ); 116 sk_sp<SkImageFilter> tileIF(SkTileImageFilter::Make(src, dst, nullptr));
117 117
118 add_paint(paints, std::move(tileIF)); 118 add_paint(paints, std::move(tileIF));
119 } 119 }
120 120
121 { 121 {
122 static const SkDropShadowImageFilter::ShadowMode kBoth = 122 static const SkDropShadowImageFilter::ShadowMode kBoth =
123 SkDropShadowImageFilter::kDrawShadowAndForeground_ShadowMode ; 123 SkDropShadowImageFilter::kDrawShadowAndForeground_ShadowMode ;
124 124
125 sk_sp<SkImageFilter> dsif(SkDropShadowImageFilter::Make(10.0f, 10.0f, 125 sk_sp<SkImageFilter> dsif(SkDropShadowImageFilter::Make(10.0f, 10.0f,
126 3.0f, 3.0f, 126 3.0f, 3.0f,
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 } 313 }
314 314
315 private: 315 private:
316 typedef GM INHERITED; 316 typedef GM INHERITED;
317 }; 317 };
318 318
319 ////////////////////////////////////////////////////////////////////////////// 319 //////////////////////////////////////////////////////////////////////////////
320 320
321 DEF_GM(return new ImageFilterFastBoundGM;) 321 DEF_GM(return new ImageFilterFastBoundGM;)
322 } 322 }
OLDNEW
« no previous file with comments | « gm/bigtileimagefilter.cpp ('k') | gm/tileimagefilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698