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

Side by Side Diff: gm/pathcontourstart.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/patchgrid.cpp ('k') | gm/patheffects.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 2015 Google Inc. 2 * Copyright 2015 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 9
10 #include "SkDashPathEffect.h" 10 #include "SkDashPathEffect.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 rrect.setOval(rect); 83 rrect.setOval(rect);
84 84
85 SkPath path; 85 SkPath path;
86 path.addRRect(rrect, dir, startIndex); 86 path.addRRect(rrect, dir, startIndex);
87 return path; 87 return path;
88 }); 88 });
89 89
90 } 90 }
91 91
92 private: 92 private:
93 static const int kImageWidth = 1200; 93 static constexpr int kImageWidth = 1200;
94 static const int kImageHeight = 600; 94 static constexpr int kImageHeight = 600;
95 95
96 SkPaint fDashPaint, fPointsPaint; 96 SkPaint fDashPaint, fPointsPaint;
97 SkRect fRect; 97 SkRect fRect;
98 98
99 void drawDirs(SkCanvas* canvas, 99 void drawDirs(SkCanvas* canvas,
100 SkPath (*makePath)(const SkRect&, SkPath::Direction, unsigned) ) const { 100 SkPath (*makePath)(const SkRect&, SkPath::Direction, unsigned) ) const {
101 drawOneColumn(canvas, SkPath::kCW_Direction, makePath); 101 drawOneColumn(canvas, SkPath::kCW_Direction, makePath);
102 canvas->translate(kImageWidth / 10, 0); 102 canvas->translate(kImageWidth / 10, 0);
103 drawOneColumn(canvas, SkPath::kCCW_Direction, makePath); 103 drawOneColumn(canvas, SkPath::kCCW_Direction, makePath);
104 canvas->translate(kImageWidth / 10, 0); 104 canvas->translate(kImageWidth / 10, 0);
(...skipping 15 matching lines...) Expand all
120 canvas->translate(0, kImageHeight / 8); 120 canvas->translate(0, kImageHeight / 8);
121 } 121 }
122 } 122 }
123 123
124 typedef GM INHERITED; 124 typedef GM INHERITED;
125 }; 125 };
126 126
127 DEF_GM( return new ContourStartGM(); ) 127 DEF_GM( return new ContourStartGM(); )
128 128
129 } // namespace skiagm 129 } // namespace skiagm
OLDNEW
« no previous file with comments | « gm/patchgrid.cpp ('k') | gm/patheffects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698