diff options
author | 2014-08-07 11:19:11 -0700 | |
---|---|---|
committer | 2014-08-07 11:19:11 -0700 | |
commit | 0aeea6d344f12e35e29a79f4bbc48af88f913204 (patch) | |
tree | 8f70b9217293ba30fc9425159b70f50ee25ee47e /tests | |
parent | 2fc05823fed4b9649338f3029cd1ba05ef49a02f (diff) |
Revert of add isRect() check to AAClip, to detect if a soft-clip is really just an irect (https://codereview.chromium.org/445233006/)
Reason for revert:
new code asserts on some pictures
Original issue's description:
> add isRect() check to AAClip, to detect if a soft-clip is really just an irect
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/592cb8d552556b1e922887d506d00b64bc5d0547
R=bsalomon@google.com, humper@google.com
TBR=bsalomon@google.com, humper@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: reed@google.com
Review URL: https://codereview.chromium.org/452533002
Diffstat (limited to 'tests')
-rw-r--r-- | tests/AAClipTest.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/tests/AAClipTest.cpp b/tests/AAClipTest.cpp index 776cd5267a..26c1ec1d0e 100644 --- a/tests/AAClipTest.cpp +++ b/tests/AAClipTest.cpp @@ -318,30 +318,6 @@ static void test_path_with_hole(skiatest::Reporter* reporter) { } } -static void test_really_a_rect(skiatest::Reporter* reporter) { - SkRRect rrect; - rrect.setRectXY(SkRect::MakeWH(100, 100), 5, 5); - - SkPath path; - path.addRRect(rrect); - - SkAAClip clip; - clip.setPath(path); - - REPORTER_ASSERT(reporter, clip.getBounds() == SkIRect::MakeWH(100, 100)); - REPORTER_ASSERT(reporter, !clip.isRect()); - - // This rect should intersect the clip, but slice-out all of the "soft" parts, - // leaving just a rect. - const SkIRect ir = SkIRect::MakeLTRB(10, -10, 50, 90); - - clip.op(ir, SkRegion::kIntersect_Op); - - REPORTER_ASSERT(reporter, clip.getBounds() == SkIRect::MakeLTRB(10, 0, 50, 90)); - // the clip recognized that that it is just a rect! - REPORTER_ASSERT(reporter, clip.isRect()); -} - #include "SkRasterClip.h" static void copyToMask(const SkRasterClip& rc, SkMask* mask) { @@ -428,5 +404,4 @@ DEF_TEST(AAClip, reporter) { test_path_with_hole(reporter); test_regressions(); test_nearly_integral(reporter); - test_really_a_rect(reporter); } |