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

Unified Diff: gm/textblobmixedsizes.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/textbloblooper.cpp ('k') | gm/textblobrandomfont.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/textblobmixedsizes.cpp
diff --git a/gm/textblobmixedsizes.cpp b/gm/textblobmixedsizes.cpp
index 4e3f0eaeb58f4c6d11e2aa7fd8e949276f5d4e47..6ce0eafe629d44f26758954314303fdfc075c5ca 100644
--- a/gm/textblobmixedsizes.cpp
+++ b/gm/textblobmixedsizes.cpp
@@ -118,8 +118,8 @@ protected:
SkRect bounds = fBlob->bounds();
- static const int kPadX = SkScalarFloorToInt(bounds.width() / 3);
- static const int kPadY = SkScalarFloorToInt(bounds.height() / 3);
+ const int kPadX = SkScalarFloorToInt(bounds.width() / 3);
+ const int kPadY = SkScalarFloorToInt(bounds.height() / 3);
int rowCount = 0;
canvas->translate(SkIntToScalar(kPadX), SkIntToScalar(kPadY));
@@ -132,13 +132,13 @@ protected:
}
paint.setAntiAlias(false);
- static const SkScalar kSigma = SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(8));
+ const SkScalar kSigma = SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(8));
// setup blur paint
SkPaint blurPaint(paint);
blurPaint.setColor(sk_tool_utils::color_to_565(SK_ColorBLACK));
blurPaint.setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle, kSigma));
-
+
for (int i = 0; i < 4; i++) {
canvas->save();
switch (i % 2) {
@@ -179,8 +179,8 @@ protected:
private:
SkAutoTUnref<const SkTextBlob> fBlob;
- static const int kWidth = 2100;
- static const int kHeight = 1900;
+ static constexpr int kWidth = 2100;
+ static constexpr int kHeight = 1900;
bool fUseDFT;
« no previous file with comments | « gm/textbloblooper.cpp ('k') | gm/textblobrandomfont.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698