aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathTest.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-12-15 11:31:05 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-19 21:10:36 +0000
commit0a241ce808511ceb1c72d6f2473b01b455ac5101 (patch)
treec137018f24c515dde2d85d4eb6d3f0b7ed0081a7 /tests/PathTest.cpp
parentab10c8258d7588bb9c353a8ecc1944747a4fac62 (diff)
Don't canonicalize empty SkRRects. They stroke differently.
Make insetting greater than width or height collapse to a point/line. SkPath::addRRect() doesn't ignore an empty SkRRect. Change-Id: I933a3419a6d75be534f1d8328faa715772045f67 Reviewed-on: https://skia-review.googlesource.com/85680 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tests/PathTest.cpp')
-rw-r--r--tests/PathTest.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index 88ca3f8f05..4bb8c88ae1 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -3662,7 +3662,10 @@ static void test_rrect(skiatest::Reporter* reporter) {
SkRect emptyR = {10, 20, 10, 30};
rr.setRectRadii(emptyR, radii);
p.addRRect(rr);
- REPORTER_ASSERT(reporter, p.isEmpty());
+ // The round rect is "empty" in that it has no fill area. However,
+ // the path isn't "empty" in that it should have verbs and points.
+ REPORTER_ASSERT(reporter, !p.isEmpty());
+ p.reset();
SkRect largeR = {0, 0, SK_ScalarMax, SK_ScalarMax};
rr.setRectRadii(largeR, radii);
p.addRRect(rr);