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

Side by Side Diff: gm/textbloblooper.cpp

Issue 1852113003: switch maskfilters to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/skbug1719.cpp ('k') | gm/textblobmixedsizes.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 2013 Google Inc. 2 * Copyright 2013 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 9
10 #include "Sk2DPathEffect.h" 10 #include "Sk2DPathEffect.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 SkXfermode::Mode fMode; 54 SkXfermode::Mode fMode;
55 SkColor fColor; 55 SkColor fColor;
56 SkPaint::Style fStyle; 56 SkPaint::Style fStyle;
57 SkScalar fWidth; 57 SkScalar fWidth;
58 SkScalar fOffset; 58 SkScalar fOffset;
59 SkScalar fSkewX; 59 SkScalar fSkewX;
60 bool fEffect; 60 bool fEffect;
61 }; 61 };
62 62
63 static void mask_filter(SkPaint* paint) { 63 static void mask_filter(SkPaint* paint) {
64 SkMaskFilter* mf = SkBlurMaskFilter::Create(kNormal_SkBlurStyle, 64 paint->setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle,
65 SkBlurMask::ConvertRadiusToSigma(3.f)); 65 SkBlurMask::ConvertRadiusToSigma (3.f)));
66 paint->setMaskFilter(mf)->unref();
67 } 66 }
68 67
69 static sk_sp<SkPathEffect> make_tile_effect() { 68 static sk_sp<SkPathEffect> make_tile_effect() {
70 SkMatrix m; 69 SkMatrix m;
71 m.setScale(1.f, 1.f); 70 m.setScale(1.f, 1.f);
72 71
73 SkPath path; 72 SkPath path;
74 path.addCircle(0, 0, SkIntToScalar(5)); 73 path.addCircle(0, 0, SkIntToScalar(5));
75 74
76 return SkPath2DPathEffect::Make(m, path); 75 return SkPath2DPathEffect::Make(m, path);
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 SkAutoTUnref<const SkTextBlob> fBlob; 248 SkAutoTUnref<const SkTextBlob> fBlob;
250 SkTArray<sk_sp<SkDrawLooper>, true> fLoopers; 249 SkTArray<sk_sp<SkDrawLooper>, true> fLoopers;
251 250
252 typedef GM INHERITED; 251 typedef GM INHERITED;
253 }; 252 };
254 253
255 ////////////////////////////////////////////////////////////////////////////// 254 //////////////////////////////////////////////////////////////////////////////
256 255
257 DEF_GM(return new TextBlobLooperGM;) 256 DEF_GM(return new TextBlobLooperGM;)
258 } 257 }
OLDNEW
« no previous file with comments | « gm/skbug1719.cpp ('k') | gm/textblobmixedsizes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698