diff options
author | Cary Clark <caryclark@google.com> | 2018-04-10 09:16:41 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-10 14:17:21 +0000 |
commit | 58627cb8eb559670b86f06225eb87e6c1c5e8504 (patch) | |
tree | eae6ea1a216052198638725f4573b0e26d8f6933 /gm | |
parent | 5c715188470e97e4f573ffe78b7ee9451aaa7612 (diff) |
one more path is rect bug
Add a check to see that the close path generated line
is horizontal or vertical when determining that path
is a rect.
Also change several tests to defer their initialization
to reduce debugging interference.
R=brianosman@google.com,robertphillips@google.com
Bug: 824145,skia:7792
Change-Id: I4a081ee4ffd3558b499a7a1aede2d6232059715e
Reviewed-on: https://skia-review.googlesource.com/120081
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
Diffstat (limited to 'gm')
-rw-r--r-- | gm/shapes.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gm/shapes.cpp b/gm/shapes.cpp index c746a493df..0b01390796 100644 --- a/gm/shapes.cpp +++ b/gm/shapes.cpp @@ -19,6 +19,15 @@ namespace skiagm { class ShapesGM : public GM { protected: ShapesGM(const char* name, bool antialias) : fName(name), fAntialias(antialias) { + if (!antialias) { + fName.append("_bw"); + } + } + + SkString onShortName() override final { return fName; } + SkISize onISize() override { return SkISize::Make(500, 500); } + + void onOnceBeforeDraw() override { fShapes.push_back().setOval(SkRect::MakeXYWH(-5, 25, 200, 100)); fRotations.push_back(21); @@ -50,15 +59,6 @@ protected: fShapes.push_back().setRectRadii(SkRect::MakeXYWH(180, -30, 80, 60), radii2); fRotations.push_back(295); - if (!antialias) { - fName.append("_bw"); - } - } - - SkString onShortName() override final { return fName; } - SkISize onISize() override { return SkISize::Make(500, 500); } - - void onOnceBeforeDraw() override { fPaint.setAntiAlias(fAntialias); } |