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

Side by Side Diff: gm/circles.cpp

Issue 1535353002: change all factories to return their base-class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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/MatrixConvolutionBench.cpp ('k') | gm/imagefiltersgraph.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 /* 2 /*
3 * Copyright 2012 Intel Inc. 3 * Copyright 2012 Intel Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 SK_ARRAY_COUNT(colors), 74 SK_ARRAY_COUNT(colors),
75 SkShader::kClamp_TileMode); 75 SkShader::kClamp_TileMode);
76 p.setShader(s)->unref(); 76 p.setShader(s)->unref();
77 fPaints.push_back(p); 77 fPaints.push_back(p);
78 } 78 }
79 79
80 { 80 {
81 // AA with blur 81 // AA with blur
82 SkPaint p; 82 SkPaint p;
83 p.setAntiAlias(true); 83 p.setAntiAlias(true);
84 SkBlurDrawLooper* shadowLooper = 84 SkDrawLooper* shadowLooper =
85 SkBlurDrawLooper::Create(SK_ColorBLUE, 85 SkBlurDrawLooper::Create(SK_ColorBLUE,
86 SkBlurMask::ConvertRadiusToSigma(SkIntToSca lar(10)), 86 SkBlurMask::ConvertRadiusToSigma(SkIntToSca lar(10)),
87 SkIntToScalar(5), SkIntToScalar(10), 87 SkIntToScalar(5), SkIntToScalar(10),
88 SkBlurDrawLooper::kIgnoreTransform_BlurFlag | 88 SkBlurDrawLooper::kIgnoreTransform_BlurFlag |
89 SkBlurDrawLooper::kOverrideColor_BlurFlag | 89 SkBlurDrawLooper::kOverrideColor_BlurFlag |
90 SkBlurDrawLooper::kHighQuality_BlurFlag); 90 SkBlurDrawLooper::kHighQuality_BlurFlag);
91 SkAutoUnref aurL0(shadowLooper); 91 SkAutoUnref aurL0(shadowLooper);
92 p.setLooper(shadowLooper); 92 p.setLooper(shadowLooper);
93 fPaints.push_back(p); 93 fPaints.push_back(p);
94 } 94 }
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 SkTArray<SkPaint> fPaints; 210 SkTArray<SkPaint> fPaints;
211 SkTArray<SkMatrix> fMatrices; 211 SkTArray<SkMatrix> fMatrices;
212 }; 212 };
213 213
214 ////////////////////////////////////////////////////////////////////////////// 214 //////////////////////////////////////////////////////////////////////////////
215 215
216 static GM* MyFactory(void*) { return new CircleGM; } 216 static GM* MyFactory(void*) { return new CircleGM; }
217 static GMRegistry reg(MyFactory); 217 static GMRegistry reg(MyFactory);
218 218
219 } 219 }
OLDNEW
« no previous file with comments | « bench/MatrixConvolutionBench.cpp ('k') | gm/imagefiltersgraph.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698