| 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 | 7 |
| 8 | 8 |
| 9 | 9 |
| 10 #include "gm.h" | 10 #include "gm.h" |
| 11 #include "SkRandom.h" | 11 #include "SkRandom.h" |
| 12 | 12 |
| 13 namespace skiagm { | 13 namespace skiagm { |
| 14 | 14 |
| 15 #define W 400 | 15 #define W 400 |
| 16 #define H 400 | 16 #define H 400 |
| 17 #define N 100 | 17 #define N 100 |
| 18 | 18 |
| 19 static const SkScalar SW = SkIntToScalar(W); | 19 constexpr SkScalar SW = SkIntToScalar(W); |
| 20 static const SkScalar SH = SkIntToScalar(H); | 20 constexpr SkScalar SH = SkIntToScalar(H); |
| 21 | 21 |
| 22 class StrokeRectsGM : public GM { | 22 class StrokeRectsGM : public GM { |
| 23 public: | 23 public: |
| 24 StrokeRectsGM() {} | 24 StrokeRectsGM() {} |
| 25 | 25 |
| 26 protected: | 26 protected: |
| 27 | 27 |
| 28 SkString onShortName() override { | 28 SkString onShortName() override { |
| 29 return SkString("strokerects"); | 29 return SkString("strokerects"); |
| 30 } | 30 } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 private: | 74 private: |
| 75 typedef GM INHERITED; | 75 typedef GM INHERITED; |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 ////////////////////////////////////////////////////////////////////////////// | 78 ////////////////////////////////////////////////////////////////////////////// |
| 79 | 79 |
| 80 static GM* MyFactory(void*) { return new StrokeRectsGM; } | 80 static GM* MyFactory(void*) { return new StrokeRectsGM; } |
| 81 static GMRegistry reg(MyFactory); | 81 static GMRegistry reg(MyFactory); |
| 82 | 82 |
| 83 } | 83 } |
| OLD | NEW |