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

Side by Side Diff: gm/shadows.cpp

Issue 2300623005: Replace a lot of 'static const' with 'constexpr' or 'const'. (Closed)
Patch Set: small msvc concession Created 4 years, 3 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/shadowmaps.cpp ('k') | gm/simpleaaclip.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 2011 Google Inc. 2 * Copyright 2011 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 SkBlurDrawLooper::kIgnoreTransform_BlurFlag | 80 SkBlurDrawLooper::kIgnoreTransform_BlurFlag |
81 SkBlurDrawLooper::kOverrideColor_BlurFlag | 81 SkBlurDrawLooper::kOverrideColor_BlurFlag |
82 SkBlurDrawLooper::kHighQuality_BlurFlag), 82 SkBlurDrawLooper::kHighQuality_BlurFlag),
83 SkBlurDrawLooper::Make(SK_ColorBLACK, SkIntToScalar(0), 83 SkBlurDrawLooper::Make(SK_ColorBLACK, SkIntToScalar(0),
84 SkIntToScalar(5), SkIntToScalar(5), 84 SkIntToScalar(5), SkIntToScalar(5),
85 SkBlurDrawLooper::kIgnoreTransform_BlurFlag | 85 SkBlurDrawLooper::kIgnoreTransform_BlurFlag |
86 SkBlurDrawLooper::kOverrideColor_BlurFlag | 86 SkBlurDrawLooper::kOverrideColor_BlurFlag |
87 SkBlurDrawLooper::kHighQuality_BlurFlag), 87 SkBlurDrawLooper::kHighQuality_BlurFlag),
88 }; 88 };
89 89
90 static const struct { 90 constexpr struct {
91 SkColor fColor; 91 SkColor fColor;
92 SkScalar fStrokeWidth; 92 SkScalar fStrokeWidth;
93 } gRec[] = { 93 } gRec[] = {
94 { SK_ColorRED, -SK_Scalar1 }, 94 { SK_ColorRED, -SK_Scalar1 },
95 { SK_ColorGREEN, SkIntToScalar(4) }, 95 { SK_ColorGREEN, SkIntToScalar(4) },
96 { SK_ColorBLUE, SkIntToScalar(0)}, 96 { SK_ColorBLUE, SkIntToScalar(0)},
97 }; 97 };
98 98
99 SkPaint paint; 99 SkPaint paint;
100 paint.setAntiAlias(true); 100 paint.setAntiAlias(true);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 private: 135 private:
136 typedef GM INHERITED; 136 typedef GM INHERITED;
137 }; 137 };
138 138
139 /////////////////////////////////////////////////////////////////////////////// 139 ///////////////////////////////////////////////////////////////////////////////
140 140
141 static GM* MyFactory(void*) { return new ShadowsGM; } 141 static GM* MyFactory(void*) { return new ShadowsGM; }
142 static GMRegistry reg(MyFactory); 142 static GMRegistry reg(MyFactory);
143 143
144 } 144 }
OLDNEW
« no previous file with comments | « gm/shadowmaps.cpp ('k') | gm/simpleaaclip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698