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

Side by Side Diff: gm/blurcircles.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/bleed.cpp ('k') | gm/blurcircles2.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 2014 Google Inc. 2 * Copyright 2014 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 "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 SkPaint paint; 51 SkPaint paint;
52 paint.setColor(SK_ColorBLACK); 52 paint.setColor(SK_ColorBLACK);
53 paint.setMaskFilter(fBlurFilters[i]); 53 paint.setMaskFilter(fBlurFilters[i]);
54 54
55 canvas->drawCircle(SkIntToScalar(50),SkIntToScalar(50),SkIntToSc alar(circleRadii[j]),paint); 55 canvas->drawCircle(SkIntToScalar(50),SkIntToScalar(50),SkIntToSc alar(circleRadii[j]),paint);
56 canvas->translate(SkIntToScalar(150), 0); 56 canvas->translate(SkIntToScalar(150), 0);
57 } 57 }
58 } 58 }
59 } 59 }
60 private: 60 private:
61 static const int kNumBlurs = 4; 61 static constexpr int kNumBlurs = 4;
62 62
63 sk_sp<SkMaskFilter> fBlurFilters[kNumBlurs]; 63 sk_sp<SkMaskFilter> fBlurFilters[kNumBlurs];
64 64
65 typedef skiagm::GM INHERITED; 65 typedef skiagm::GM INHERITED;
66 }; 66 };
67 67
68 DEF_GM(return new BlurCirclesGM();) 68 DEF_GM(return new BlurCirclesGM();)
OLDNEW
« no previous file with comments | « gm/bleed.cpp ('k') | gm/blurcircles2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698