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

Unified Diff: gm/imagefromyuvtextures.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/imageblur2.cpp ('k') | gm/imagemagnifier.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imagefromyuvtextures.cpp
diff --git a/gm/imagefromyuvtextures.cpp b/gm/imagefromyuvtextures.cpp
index e523d2298837854693741f9ffd50d7fee1d7ce96..13e0300bbc9059af467b360bd4cdb27b002a7d30 100644
--- a/gm/imagefromyuvtextures.cpp
+++ b/gm/imagefromyuvtextures.cpp
@@ -38,7 +38,7 @@ protected:
// We create an RGB bitmap and then extract YUV bmps where the U and V bitmaps are
// subsampled by 2 in both dimensions.
SkPaint paint;
- static const SkColor kColors[] =
+ constexpr SkColor kColors[] =
{ SK_ColorBLUE, SK_ColorYELLOW, SK_ColorGREEN, SK_ColorWHITE };
paint.setShader(SkGradientShader::MakeRadial(SkPoint::Make(0,0), kBmpSize / 2.f, kColors,
nullptr, SK_ARRAY_COUNT(kColors),
@@ -131,7 +131,7 @@ protected:
}
- static const SkScalar kPad = 10.f;
+ constexpr SkScalar kPad = 10.f;
SkISize sizes[] = {
{ fYUVBmps[0].width(), fYUVBmps[0].height()},
@@ -161,7 +161,7 @@ private:
sk_sp<SkImage> fRGBImage;
SkBitmap fYUVBmps[3];
- static const int kBmpSize = 32;
+ static constexpr int kBmpSize = 32;
typedef GM INHERITED;
};
« no previous file with comments | « gm/imageblur2.cpp ('k') | gm/imagemagnifier.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698