| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |