| 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 #include "SkTArray.h" | 10 #include "SkTArray.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 virtual uint32_t onGetFlags() const SK_OVERRIDE { | 37 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 38 return kSkipTiled_Flag; | 38 return kSkipTiled_Flag; |
| 39 } | 39 } |
| 40 | 40 |
| 41 virtual SkString onShortName() { | 41 virtual SkString onShortName() { |
| 42 return SkString("convexpaths"); | 42 return SkString("convexpaths"); |
| 43 } | 43 } |
| 44 | 44 |
| 45 | 45 |
| 46 virtual SkISize onISize() { | 46 virtual SkISize onISize() { |
| 47 return make_isize(1200, 1100); | 47 return SkISize::Make(1200, 1100); |
| 48 } | 48 } |
| 49 | 49 |
| 50 void makePaths() { | 50 void makePaths() { |
| 51 if (fOnce.alreadyDone()) { | 51 if (fOnce.alreadyDone()) { |
| 52 return; | 52 return; |
| 53 } | 53 } |
| 54 fOnce.accomplished(); | 54 fOnce.accomplished(); |
| 55 | 55 |
| 56 fPaths.push_back().moveTo(0, 0); | 56 fPaths.push_back().moveTo(0, 0); |
| 57 fPaths.back().quadTo(50 * SK_Scalar1, 100 * SK_Scalar1, | 57 fPaths.back().quadTo(50 * SK_Scalar1, 100 * SK_Scalar1, |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 typedef GM INHERITED; | 292 typedef GM INHERITED; |
| 293 SkTArray<SkPath> fPaths; | 293 SkTArray<SkPath> fPaths; |
| 294 }; | 294 }; |
| 295 | 295 |
| 296 ////////////////////////////////////////////////////////////////////////////// | 296 ////////////////////////////////////////////////////////////////////////////// |
| 297 | 297 |
| 298 static GM* MyFactory(void*) { return new ConvexPathsGM; } | 298 static GM* MyFactory(void*) { return new ConvexPathsGM; } |
| 299 static GMRegistry reg(MyFactory); | 299 static GMRegistry reg(MyFactory); |
| 300 | 300 |
| 301 } | 301 } |
| OLD | NEW |