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

Side by Side Diff: gm/rects.cpp

Issue 253833002: move common blur types into central header (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « gm/megalooper.cpp ('k') | gm/skbug1719.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.setAlpha(0x66); 57 p.setAlpha(0x66);
58 fPaints.push_back(p); 58 fPaints.push_back(p);
59 } 59 }
60 60
61 { 61 {
62 // AA with mask filter 62 // AA with mask filter
63 SkPaint p; 63 SkPaint p;
64 p.setColor(SK_ColorWHITE); 64 p.setColor(SK_ColorWHITE);
65 p.setAntiAlias(true); 65 p.setAntiAlias(true);
66 SkMaskFilter* mf = SkBlurMaskFilter::Create( 66 SkMaskFilter* mf = SkBlurMaskFilter::Create(
67 SkBlurMaskFilter::kNormal_BlurStyle, 67 kNormal_SkBlurStyle,
68 SkBlurMask::ConvertRadiusToSigma(SkIntToScala r(5)), 68 SkBlurMask::ConvertRadiusToSigma(SkIntToScala r(5)),
69 SkBlurMaskFilter::kHighQuality_BlurFlag); 69 SkBlurMaskFilter::kHighQuality_BlurFlag);
70 p.setMaskFilter(mf)->unref(); 70 p.setMaskFilter(mf)->unref();
71 fPaints.push_back(p); 71 fPaints.push_back(p);
72 } 72 }
73 73
74 { 74 {
75 // AA with radial shader 75 // AA with radial shader
76 SkPaint p; 76 SkPaint p;
77 p.setColor(SK_ColorWHITE); 77 p.setColor(SK_ColorWHITE);
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 292
293 typedef GM INHERITED; 293 typedef GM INHERITED;
294 }; 294 };
295 295
296 ////////////////////////////////////////////////////////////////////////////// 296 //////////////////////////////////////////////////////////////////////////////
297 297
298 static GM* MyFactory(void*) { return new RectsGM; } 298 static GM* MyFactory(void*) { return new RectsGM; }
299 static GMRegistry reg(MyFactory); 299 static GMRegistry reg(MyFactory);
300 300
301 } 301 }
OLDNEW
« no previous file with comments | « gm/megalooper.cpp ('k') | gm/skbug1719.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698