| Index: gm/modecolorfilters.cpp
|
| diff --git a/gm/modecolorfilters.cpp b/gm/modecolorfilters.cpp
|
| index 4e5d45cf96e5045ee6de71db739c2fc32927d4e7..50bb27f9d8a561db3691e755dd70356660575b17 100644
|
| --- a/gm/modecolorfilters.cpp
|
| +++ b/gm/modecolorfilters.cpp
|
| @@ -16,7 +16,7 @@ namespace skiagm {
|
|
|
| // Using gradients because GPU doesn't currently have an implementation of SkColorShader (duh!)
|
| static sk_sp<SkShader> make_color_shader(SkColor color) {
|
| - static const SkPoint kPts[] = {{0, 0}, {1, 1}};
|
| + constexpr SkPoint kPts[] = {{0, 0}, {1, 1}};
|
| SkColor colors[] = {color, color};
|
|
|
| return SkGradientShader::MakeLinear(kPts, colors, nullptr, 2, SkShader::kClamp_TileMode);
|
| @@ -68,10 +68,10 @@ protected:
|
|
|
| void onDraw(SkCanvas* canvas) override {
|
| // size of rect for each test case
|
| - static const int kRectWidth = 20;
|
| - static const int kRectHeight = 20;
|
| + constexpr int kRectWidth = 20;
|
| + constexpr int kRectHeight = 20;
|
|
|
| - static const int kCheckSize = 10;
|
| + constexpr int kCheckSize = 10;
|
|
|
| if (!fBmpShader) {
|
| fBmpShader = make_bg_shader(kCheckSize);
|
| @@ -118,7 +118,7 @@ protected:
|
|
|
| SkPaint paint;
|
| int idx = 0;
|
| - static const int kRectsPerRow = SkMax32(this->getISize().fWidth / kRectWidth, 1);
|
| + const int kRectsPerRow = SkMax32(this->getISize().fWidth / kRectWidth, 1);
|
| for (size_t cfm = 0; cfm < SK_ARRAY_COUNT(modes); ++cfm) {
|
| for (size_t cfc = 0; cfc < SK_ARRAY_COUNT(colors); ++cfc) {
|
| paint.setColorFilter(SkColorFilter::MakeModeFilter(colors[cfc], modes[cfm]));
|
|
|