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

Side by Side Diff: gm/imagescalealigned.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/imagemagnifier.cpp ('k') | gm/imagesource2.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 "SkImage.h" 10 #include "SkImage.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 img->width() * (1 + (set.fScales[i] - 1) * set.fVector.x()), 131 img->width() * (1 + (set.fScales[i] - 1) * set.fVector.x()),
132 img->height() * (1 + (set.fScales[i] - 1) * set.fVector.y()) ); 132 img->height() * (1 + (set.fScales[i] - 1) * set.fVector.y()) );
133 133
134 canvas->drawImageRect(img.get(), dst, &paint); 134 canvas->drawImageRect(img.get(), dst, &paint);
135 pt.offset(dst.width() * set.fVector.x(), dst.height() * set.fVector. y()); 135 pt.offset(dst.width() * set.fVector.x(), dst.height() * set.fVector. y());
136 } 136 }
137 137
138 return pt; 138 return pt;
139 } 139 }
140 140
141 static const unsigned kSegLen = 15; 141 static constexpr unsigned kSegLen = 15;
142 static const unsigned kStretchFactor = 4; 142 static constexpr unsigned kStretchFactor = 4;
143 SkSTArray<2, ImageSet> fSets; 143 SkSTArray<2, ImageSet> fSets;
144 144
145 typedef GM INHERITED; 145 typedef GM INHERITED;
146 }; 146 };
147 147
148 DEF_GM(return new ImageScaleAlignedGM();) 148 DEF_GM(return new ImageScaleAlignedGM();)
OLDNEW
« no previous file with comments | « gm/imagemagnifier.cpp ('k') | gm/imagesource2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698