| 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" |
| 11 | 11 |
| 12 namespace skiagm { | 12 namespace skiagm { |
| 13 | 13 |
| 14 // Test out various combinations of nested rects, ovals and rrects. | 14 // Test out various combinations of nested rects, ovals and rrects. |
| 15 class NestedGM : public GM { | 15 class NestedGM : public GM { |
| 16 public: | 16 public: |
| 17 NestedGM(bool doAA, bool flipped) : fDoAA(doAA), fFlipped(flipped) { | 17 NestedGM(bool doAA, bool flipped) : fDoAA(doAA), fFlipped(flipped) { |
| 18 this->setBGColor(sk_tool_utils::color_to_565(0xFFDDDDDD)); | 18 this->setBGColor(0xFFDDDDDD); |
| 19 } | 19 } |
| 20 | 20 |
| 21 protected: | 21 protected: |
| 22 | 22 |
| 23 SkString onShortName() override { | 23 SkString onShortName() override { |
| 24 SkString name("nested"); | 24 SkString name("nested"); |
| 25 if (fFlipped) { | 25 if (fFlipped) { |
| 26 name.append("_flipY"); | 26 name.append("_flipY"); |
| 27 } | 27 } |
| 28 if (fDoAA) { | 28 if (fDoAA) { |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 /////////////////////////////////////////////////////////////////////////////// | 134 /////////////////////////////////////////////////////////////////////////////// |
| 135 | 135 |
| 136 DEF_GM( return new NestedGM(/* doAA = */ true, /* flipped = */ false); ) | 136 DEF_GM( return new NestedGM(/* doAA = */ true, /* flipped = */ false); ) |
| 137 DEF_GM( return new NestedGM(/* doAA = */ false, /* flipped = */ false); ) | 137 DEF_GM( return new NestedGM(/* doAA = */ false, /* flipped = */ false); ) |
| 138 DEF_GM( return new NestedGM(/* doAA = */ true, /* flipped = */ true); ) | 138 DEF_GM( return new NestedGM(/* doAA = */ true, /* flipped = */ true); ) |
| 139 DEF_GM( return new NestedGM(/* doAA = */ false, /* flipped = */ true); ) | 139 DEF_GM( return new NestedGM(/* doAA = */ false, /* flipped = */ true); ) |
| 140 | 140 |
| 141 } | 141 } |
| OLD | NEW |