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

Side by Side Diff: gm/rects.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/megalooper.cpp ('k') | gm/samplerstress.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 #include "SkBlurDrawLooper.h" 9 #include "SkBlurDrawLooper.h"
10 #include "SkBlurMask.h" 10 #include "SkBlurMask.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 p.setAntiAlias(true); 57 p.setAntiAlias(true);
58 p.setAlpha(0x66); 58 p.setAlpha(0x66);
59 fPaints.push_back(p); 59 fPaints.push_back(p);
60 } 60 }
61 61
62 { 62 {
63 // AA with mask filter 63 // AA with mask filter
64 SkPaint p; 64 SkPaint p;
65 p.setColor(SK_ColorWHITE); 65 p.setColor(SK_ColorWHITE);
66 p.setAntiAlias(true); 66 p.setAntiAlias(true);
67 SkMaskFilter* mf = SkBlurMaskFilter::Create( 67 p.setMaskFilter(SkBlurMaskFilter::Make(
68 kNormal_SkBlurStyle, 68 kNormal_SkBlurStyle,
69 SkBlurMask::ConvertRadiusToSigma(SkIntToScala r(5)), 69 SkBlurMask::ConvertRadiusToSigma(SkIntToScala r(5)),
70 SkBlurMaskFilter::kHighQuality_BlurFlag); 70 SkBlurMaskFilter::kHighQuality_BlurFlag));
71 p.setMaskFilter(mf)->unref();
72 fPaints.push_back(p); 71 fPaints.push_back(p);
73 } 72 }
74 73
75 { 74 {
76 // AA with radial shader 75 // AA with radial shader
77 SkPaint p; 76 SkPaint p;
78 p.setColor(SK_ColorWHITE); 77 p.setColor(SK_ColorWHITE);
79 p.setAntiAlias(true); 78 p.setAntiAlias(true);
80 SkPoint center = SkPoint::Make(SkIntToScalar(-5), SkIntToScalar(30)) ; 79 SkPoint center = SkPoint::Make(SkIntToScalar(-5), SkIntToScalar(30)) ;
81 SkColor colors[] = { SK_ColorBLUE, SK_ColorRED, SK_ColorGREEN }; 80 SkColor colors[] = { SK_ColorBLUE, SK_ColorRED, SK_ColorGREEN };
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 279
281 typedef GM INHERITED; 280 typedef GM INHERITED;
282 }; 281 };
283 282
284 ////////////////////////////////////////////////////////////////////////////// 283 //////////////////////////////////////////////////////////////////////////////
285 284
286 static GM* MyFactory(void*) { return new RectsGM; } 285 static GM* MyFactory(void*) { return new RectsGM; }
287 static GMRegistry reg(MyFactory); 286 static GMRegistry reg(MyFactory);
288 287
289 } 288 }
OLDNEW
« no previous file with comments | « gm/megalooper.cpp ('k') | gm/samplerstress.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698