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

Unified Diff: gm/aaxfermodes.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/aarectmodes.cpp ('k') | gm/alphagradients.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/aaxfermodes.cpp
diff --git a/gm/aaxfermodes.cpp b/gm/aaxfermodes.cpp
index 2ea1844e274ebedb584e2885f278ab7c2c94c9f5..78f7d3e32474c13b81b53f17f1690b2dbc279361 100644
--- a/gm/aaxfermodes.cpp
+++ b/gm/aaxfermodes.cpp
@@ -23,11 +23,11 @@ enum {
kSubtitleSpacing = 5 * kShapeSpacing / 8
};
-static const SkColor kBGColor = SkColorSetARGB(200, 210, 184, 135);
+constexpr SkColor kBGColor = 0xc8d2b887;
-static const SkColor kShapeColors[2] = {
- SkColorSetARGB(130, 255, 0, 128), // input color unknown
- SkColorSetARGB(255, 0, 255, 255) // input color opaque
+constexpr SkColor kShapeColors[2] = {
+ 0x82ff0080, // input color unknown
+ 0xff00ffff, // input color opaque
};
enum Shape {
@@ -73,7 +73,7 @@ protected:
fLabelPaint.setTextSize(5 * kShapeSize/8);
fLabelPaint.setSubpixelText(true);
- static const SkScalar radius = -1.4f * kShapeSize/2;
+ constexpr SkScalar radius = -1.4f * kShapeSize/2;
SkPoint pts[4] = {
{-radius, 0},
{0, -1.33f * radius},
« no previous file with comments | « gm/aarectmodes.cpp ('k') | gm/alphagradients.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698