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

Unified Diff: gm/rrects.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/rrectclipdrawpaint.cpp ('k') | gm/samplerstress.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/rrects.cpp
diff --git a/gm/rrects.cpp b/gm/rrects.cpp
index 0f3ac56fec59c2f38e36467f787190459935cb09..63b6dbc4275cf9fcae9cece0150952e8950de94a 100644
--- a/gm/rrects.cpp
+++ b/gm/rrects.cpp
@@ -73,11 +73,11 @@ protected:
paint.setAntiAlias(true);
}
- static const SkRect kMaxTileBound = SkRect::MakeWH(SkIntToScalar(kTileX),
- SkIntToScalar(kTileY));
+ const SkRect kMaxTileBound = SkRect::MakeWH(SkIntToScalar(kTileX),
+ SkIntToScalar(kTileY));
#ifdef SK_DEBUG
- static const SkRect kMaxImageBound = SkRect::MakeWH(SkIntToScalar(kImageWidth),
- SkIntToScalar(kImageHeight));
+ const SkRect kMaxImageBound = SkRect::MakeWH(SkIntToScalar(kImageWidth),
+ SkIntToScalar(kImageHeight));
#endif
#if SK_SUPPORT_GPU
@@ -168,17 +168,17 @@ protected:
private:
Type fType;
- static const int kImageWidth = 640;
- static const int kImageHeight = 480;
+ static constexpr int kImageWidth = 640;
+ static constexpr int kImageHeight = 480;
- static const int kTileX = 80;
- static const int kTileY = 40;
+ static constexpr int kTileX = 80;
+ static constexpr int kTileY = 40;
- static const int kNumSimpleCases = 7;
- static const int kNumComplexCases = 35;
+ static constexpr int kNumSimpleCases = 7;
+ static constexpr int kNumComplexCases = 35;
static const SkVector gRadii[kNumComplexCases][4];
- static const int kNumRRects = kNumSimpleCases + kNumComplexCases;
+ static constexpr int kNumRRects = kNumSimpleCases + kNumComplexCases;
SkRRect fRRects[kNumRRects];
typedef GM INHERITED;
« no previous file with comments | « gm/rrectclipdrawpaint.cpp ('k') | gm/samplerstress.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698