| Index: gm/drawminibitmaprect.cpp
|
| diff --git a/gm/drawminibitmaprect.cpp b/gm/drawminibitmaprect.cpp
|
| index d539f2604826577345c32c6b729b8d6295b57b5d..eccf04c352fd9b3304843786cb64a3b933912766 100644
|
| --- a/gm/drawminibitmaprect.cpp
|
| +++ b/gm/drawminibitmaprect.cpp
|
| @@ -29,12 +29,12 @@ static sk_sp<SkImage> makebm(SkCanvas* caller, int w, int h) {
|
|
|
| const SkScalar radius = 4 * SkMaxScalar(wScalar, hScalar);
|
|
|
| - static const SkColor colors[] = { SK_ColorRED, SK_ColorYELLOW,
|
| + constexpr SkColor colors[] = { SK_ColorRED, SK_ColorYELLOW,
|
| SK_ColorGREEN, SK_ColorMAGENTA,
|
| SK_ColorBLUE, SK_ColorCYAN,
|
| SK_ColorRED};
|
|
|
| - static const SkScalar pos[] = {0,
|
| + constexpr SkScalar pos[] = {0,
|
| SK_Scalar1 / 6,
|
| 2 * SK_Scalar1 / 6,
|
| 3 * SK_Scalar1 / 6,
|
| @@ -60,8 +60,8 @@ static sk_sp<SkImage> makebm(SkCanvas* caller, int w, int h) {
|
| return surface->makeImageSnapshot();
|
| }
|
|
|
| -static const int gSize = 1024;
|
| -static const int gSurfaceSize = 2048;
|
| +constexpr int gSize = 1024;
|
| +constexpr int gSurfaceSize = 2048;
|
|
|
| // This GM calls drawImageRect several times using the same texture. This is
|
| // intended to exercise batching of these calls.
|
| @@ -85,10 +85,10 @@ protected:
|
| }
|
|
|
| const SkRect dstRect = { 0, 0, SkIntToScalar(64), SkIntToScalar(64)};
|
| - static const int kMaxSrcRectSize = 1 << (SkNextLog2(gSurfaceSize) + 2);
|
| + const int kMaxSrcRectSize = 1 << (SkNextLog2(gSurfaceSize) + 2);
|
|
|
| - static const int kPadX = 30;
|
| - static const int kPadY = 40;
|
| + constexpr int kPadX = 30;
|
| + constexpr int kPadY = 40;
|
|
|
| int rowCount = 0;
|
| canvas->translate(SkIntToScalar(kPadX), SkIntToScalar(kPadY));
|
|
|