| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #include "gm.h" | 8 #include "gm.h" |
| 9 #include "SkRandom.h" | 9 #include "SkRandom.h" |
| 10 #include "SkRRect.h" | 10 #include "SkRRect.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 SkString name("nested"); | 27 SkString name("nested"); |
| 28 if (fDoAA) { | 28 if (fDoAA) { |
| 29 name.append("_aa"); | 29 name.append("_aa"); |
| 30 } else { | 30 } else { |
| 31 name.append("_bw"); | 31 name.append("_bw"); |
| 32 } | 32 } |
| 33 return name; | 33 return name; |
| 34 } | 34 } |
| 35 | 35 |
| 36 virtual SkISize onISize() SK_OVERRIDE { | 36 virtual SkISize onISize() SK_OVERRIDE { |
| 37 return make_isize(kImageWidth, kImageHeight); | 37 return SkISize::Make(kImageWidth, kImageHeight); |
| 38 } | 38 } |
| 39 | 39 |
| 40 enum Shapes { | 40 enum Shapes { |
| 41 kRect_Shape = 0, | 41 kRect_Shape = 0, |
| 42 kRRect_Shape, | 42 kRRect_Shape, |
| 43 kOval_Shape, | 43 kOval_Shape, |
| 44 kShapeCount | 44 kShapeCount |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 static void AddShape(SkPath* path, const SkRect& rect, Shapes shape, SkPath:
:Direction dir) { | 47 static void AddShape(SkPath* path, const SkRect& rect, Shapes shape, SkPath:
:Direction dir) { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 typedef GM INHERITED; | 120 typedef GM INHERITED; |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 /////////////////////////////////////////////////////////////////////////////// | 123 /////////////////////////////////////////////////////////////////////////////// |
| 124 | 124 |
| 125 DEF_GM( return new NestedGM(true); ) | 125 DEF_GM( return new NestedGM(true); ) |
| 126 DEF_GM( return new NestedGM(false); ) | 126 DEF_GM( return new NestedGM(false); ) |
| 127 | 127 |
| 128 | 128 |
| 129 } | 129 } |
| OLD | NEW |