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

Side by Side Diff: gm/bitmapcopy.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 unified diff | Download patch
« no previous file with comments | « gm/bigtileimagefilter.cpp ('k') | gm/bitmappremul.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #include "gm.h" 7 #include "gm.h"
8 8
9 namespace skiagm { 9 namespace skiagm {
10 10
11 static const char* gColorTypeNames[] = { 11 static const char* gColorTypeNames[] = {
12 "unknown", 12 "unknown",
13 "A8", 13 "A8",
14 "565", 14 "565",
15 "4444", 15 "4444",
16 "8888", 16 "8888",
17 "8888", 17 "8888",
18 "Index8", 18 "Index8",
19 }; 19 };
20 20
21 static const SkColorType gColorTypes[] = { 21 constexpr SkColorType gColorTypes[] = {
22 kRGB_565_SkColorType, 22 kRGB_565_SkColorType,
23 kARGB_4444_SkColorType, 23 kARGB_4444_SkColorType,
24 kN32_SkColorType, 24 kN32_SkColorType,
25 }; 25 };
26 26
27 #define NUM_CONFIGS SK_ARRAY_COUNT(gColorTypes) 27 #define NUM_CONFIGS SK_ARRAY_COUNT(gColorTypes)
28 28
29 static void draw_checks(SkCanvas* canvas, int width, int height) { 29 static void draw_checks(SkCanvas* canvas, int width, int height) {
30 SkPaint paint; 30 SkPaint paint;
31 paint.setColor(SK_ColorRED); 31 paint.setColor(SK_ColorRED);
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 private: 116 private:
117 typedef GM INHERITED; 117 typedef GM INHERITED;
118 }; 118 };
119 119
120 ////////////////////////////////////////////////////////////////////////////// 120 //////////////////////////////////////////////////////////////////////////////
121 121
122 static GM* MyFactory(void*) { return new BitmapCopyGM; } 122 static GM* MyFactory(void*) { return new BitmapCopyGM; }
123 static GMRegistry reg(MyFactory); 123 static GMRegistry reg(MyFactory);
124 } 124 }
OLDNEW
« no previous file with comments | « gm/bigtileimagefilter.cpp ('k') | gm/bitmappremul.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698