diff options
author | Stephen White <senorblanco@chromium.org> | 2017-01-12 17:15:50 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-01-13 18:49:11 +0000 |
commit | 930f69eef346b0ad4164752a074f3a45c6f46770 (patch) | |
tree | 966ba9d99fedfe369dc3b664ae8e2ea1af47bcb0 /gm/concavepaths.cpp | |
parent | cf5d6caff7a58f1c7ecc36d9a91ccdada5fc7b78 (diff) |
Switch a bunch of tests to use DEF_SIMPLE_GM.
Should be no user- or test-visible changes.
BUG=skia:
Change-Id: I6499dc978a41fee344b847c118f84227271561c5
Reviewed-on: https://skia-review.googlesource.com/6906
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephan White <senorblanco@chromium.org>
Diffstat (limited to 'gm/concavepaths.cpp')
-rw-r--r-- | gm/concavepaths.cpp | 84 |
1 files changed, 31 insertions, 53 deletions
diff --git a/gm/concavepaths.cpp b/gm/concavepaths.cpp index c68265b99f..c371615f2f 100644 --- a/gm/concavepaths.cpp +++ b/gm/concavepaths.cpp @@ -9,9 +9,6 @@ #include "SkCanvas.h" #include "SkPath.h" -#define WIDTH 400 -#define HEIGHT 600 - namespace { // Concave test void test_concave(SkCanvas* canvas, const SkPaint& paint) { @@ -363,53 +360,34 @@ void test_coincident_edges_4(SkCanvas* canvas, const SkPaint& paint) { }; -class ConcavePathsGM : public skiagm::GM { -public: - ConcavePathsGM() {} - -protected: - SkString onShortName() override { - return SkString("concavepaths"); - } - - SkISize onISize() override { - return SkISize::Make(WIDTH, HEIGHT); - } - - void onDraw(SkCanvas* canvas) override { - SkPaint paint; - - paint.setAntiAlias(true); - paint.setStyle(SkPaint::kFill_Style); - - test_concave(canvas, paint); - test_reverse_concave(canvas, paint); - test_bowtie(canvas, paint); - test_fake_bowtie(canvas, paint); - test_fish(canvas, paint); - test_fast_forward(canvas, paint); - test_hole(canvas, paint); - test_star(canvas, paint); - test_stairstep(canvas, paint); - test_stairstep2(canvas, paint); - test_overlapping(canvas, paint); - test_partners(canvas, paint); - test_monotone_1(canvas, paint); - test_monotone_2(canvas, paint); - test_monotone_3(canvas, paint); - test_monotone_4(canvas, paint); - test_monotone_5(canvas, paint); - test_degenerate(canvas, paint); - test_coincident_edge(canvas, paint); - test_bowtie_coincident_triangle(canvas, paint); - test_coincident_edges_1(canvas, paint); - test_coincident_edges_2(canvas, paint); - test_coincident_edges_3(canvas, paint); - test_coincident_edges_4(canvas, paint); - } - -private: - typedef skiagm::GM INHERITED; -}; - -DEF_GM( return new ConcavePathsGM; ) +DEF_SIMPLE_GM(concavepaths, canvas, 400, 600) { + SkPaint paint; + + paint.setAntiAlias(true); + paint.setStyle(SkPaint::kFill_Style); + + test_concave(canvas, paint); + test_reverse_concave(canvas, paint); + test_bowtie(canvas, paint); + test_fake_bowtie(canvas, paint); + test_fish(canvas, paint); + test_fast_forward(canvas, paint); + test_hole(canvas, paint); + test_star(canvas, paint); + test_stairstep(canvas, paint); + test_stairstep2(canvas, paint); + test_overlapping(canvas, paint); + test_partners(canvas, paint); + test_monotone_1(canvas, paint); + test_monotone_2(canvas, paint); + test_monotone_3(canvas, paint); + test_monotone_4(canvas, paint); + test_monotone_5(canvas, paint); + test_degenerate(canvas, paint); + test_coincident_edge(canvas, paint); + test_bowtie_coincident_triangle(canvas, paint); + test_coincident_edges_1(canvas, paint); + test_coincident_edges_2(canvas, paint); + test_coincident_edges_3(canvas, paint); + test_coincident_edges_4(canvas, paint); +} |