| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 #include "gm.h" | 8 #include "gm.h" |
| 9 #include "SkRandom.h" | 9 #include "SkRandom.h" |
| 10 | 10 |
| 11 namespace skiagm { | 11 namespace skiagm { |
| 12 | 12 |
| 13 class PointsGM : public GM { | 13 class PointsGM : public GM { |
| 14 public: | 14 public: |
| 15 PointsGM() {} | 15 PointsGM() {} |
| 16 | 16 |
| 17 protected: | 17 protected: |
| 18 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 19 return kSkipTiled_Flag; |
| 20 } |
| 21 |
| 18 virtual SkString onShortName() { | 22 virtual SkString onShortName() { |
| 19 return SkString("points"); | 23 return SkString("points"); |
| 20 } | 24 } |
| 21 | 25 |
| 22 virtual SkISize onISize() { | 26 virtual SkISize onISize() { |
| 23 return make_isize(640, 490); | 27 return make_isize(640, 490); |
| 24 } | 28 } |
| 25 | 29 |
| 26 static void fill_pts(SkPoint pts[], size_t n, SkLCGRandom* rand) { | 30 static void fill_pts(SkPoint pts[], size_t n, SkLCGRandom* rand) { |
| 27 for (size_t i = 0; i < n; i++) { | 31 for (size_t i = 0; i < n; i++) { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 private: | 68 private: |
| 65 typedef GM INHERITED; | 69 typedef GM INHERITED; |
| 66 }; | 70 }; |
| 67 | 71 |
| 68 ////////////////////////////////////////////////////////////////////////////// | 72 ////////////////////////////////////////////////////////////////////////////// |
| 69 | 73 |
| 70 static GM* MyFactory(void*) { return new PointsGM; } | 74 static GM* MyFactory(void*) { return new PointsGM; } |
| 71 static GMRegistry reg(MyFactory); | 75 static GMRegistry reg(MyFactory); |
| 72 | 76 |
| 73 } | 77 } |
| OLD | NEW |