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

Side by Side Diff: gm/complexclip2.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/complexclip.cpp ('k') | gm/complexclip3.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 8
9 #include "gm.h" 9 #include "gm.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 SkRandom r; 95 SkRandom r;
96 for (int i = 0; i < kRows; ++i) { 96 for (int i = 0; i < kRows; ++i) {
97 for (int j = 0; j < kCols; ++j) { 97 for (int j = 0; j < kCols; ++j) {
98 for (int k = 0; k < 5; ++k) { 98 for (int k = 0; k < 5; ++k) {
99 fOps[j*kRows+i][k] = ops[r.nextU() % SK_ARRAY_COUNT(ops)]; 99 fOps[j*kRows+i][k] = ops[r.nextU() % SK_ARRAY_COUNT(ops)];
100 } 100 }
101 } 101 }
102 } 102 }
103 } 103 }
104 104
105 static const int kRows = 5; 105 static constexpr int kRows = 5;
106 static const int kCols = 5; 106 static constexpr int kCols = 5;
107 static const int kPadX = 20; 107 static constexpr int kPadX = 20;
108 static const int kPadY = 20; 108 static constexpr int kPadY = 20;
109 109
110 static const char* ClipStr(Clip clip) { 110 static const char* ClipStr(Clip clip) {
111 switch (clip) { 111 switch (clip) {
112 case kRect_Clip: 112 case kRect_Clip:
113 return "rect"; 113 return "rect";
114 case kRRect_Clip: 114 case kRRect_Clip:
115 return "rrect"; 115 return "rrect";
116 case kPath_Clip: 116 case kPath_Clip:
117 return "path"; 117 return "path";
118 } 118 }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRect_Clip, false); ) 215 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRect_Clip, false); )
216 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRRect_Clip, false); ) 216 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRRect_Clip, false); )
217 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kPath_Clip, false); ) 217 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kPath_Clip, false); )
218 218
219 // aa 219 // aa
220 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRect_Clip, true); ) 220 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRect_Clip, true); )
221 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRRect_Clip, true); ) 221 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRRect_Clip, true); )
222 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kPath_Clip, true); ) 222 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kPath_Clip, true); )
223 223
224 } 224 }
OLDNEW
« no previous file with comments | « gm/complexclip.cpp ('k') | gm/complexclip3.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698