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

Unified Diff: gm/bigrrectaaeffect.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/bigblurs.cpp ('k') | gm/bigtileimagefilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/bigrrectaaeffect.cpp
diff --git a/gm/bigrrectaaeffect.cpp b/gm/bigrrectaaeffect.cpp
index 7f79a34c6bf62434de74d0d896440fd8fc6fa81e..8387d5ed16e256032240b65d22eb6f4cd44609e5 100644
--- a/gm/bigrrectaaeffect.cpp
+++ b/gm/bigrrectaaeffect.cpp
@@ -58,7 +58,7 @@ protected:
int y = kPad;
int x = kPad;
- static const GrPrimitiveEdgeType kEdgeTypes[] = {
+ constexpr GrPrimitiveEdgeType kEdgeTypes[] = {
kFillAA_GrProcessorEdgeType,
kInverseFillAA_GrProcessorEdgeType,
};
@@ -98,9 +98,9 @@ protected:
private:
// pad between test cases
- static const int kPad = 7;
+ static constexpr int kPad = 7;
// gap between rect for each case that is rendered and exterior of rrect
- static const int kGap = 3;
+ static constexpr int kGap = 3;
SkRRect fRRect;
int fWidth;
@@ -116,7 +116,7 @@ private:
///////////////////////////////////////////////////////////////////////////////
// This value is motivated by bug chromium:477684. It has to be large to cause overflow in
// the shader
-static const int kSize = 700;
+constexpr int kSize = 700;
DEF_GM( return new BigRRectAAEffectGM (SkRRect::MakeRect(SkRect::MakeIWH(kSize, kSize)), "rect"); )
DEF_GM( return new BigRRectAAEffectGM (SkRRect::MakeOval(SkRect::MakeIWH(kSize, kSize)), "circle"); )
« no previous file with comments | « gm/bigblurs.cpp ('k') | gm/bigtileimagefilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698