aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/AAClipTest.cpp
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-01-03 15:35:33 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-03 21:01:54 +0000
commit9fc53624a09f6d3378b0a540832571dc1c31fbcd (patch)
tree74e3ea18c10eafc1c4c104c6d1c7b48e70975c8e /tests/AAClipTest.cpp
parent3a8a277d9364b6747ee16f55c70c974cd0f8d134 (diff)
check for irect with overflow width/height
Bug:798066 Change-Id: Iac324ac5a32fae241a528751c84279ce60ac4baf Reviewed-on: https://skia-review.googlesource.com/90544 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'tests/AAClipTest.cpp')
-rw-r--r--tests/AAClipTest.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/AAClipTest.cpp b/tests/AAClipTest.cpp
index 5b156a40b5..18cc30c745 100644
--- a/tests/AAClipTest.cpp
+++ b/tests/AAClipTest.cpp
@@ -409,6 +409,15 @@ static void test_crbug_422693(skiatest::Reporter* reporter) {
rc.op(path, SkMatrix::I(), rc.getBounds(), SkRegion::kIntersect_Op, true);
}
+static void test_huge(skiatest::Reporter* reporter) {
+ SkAAClip clip;
+ int big = 0x70000000;
+ SkIRect r = { -big, -big, big, big };
+ SkASSERT(r.width() < 0 && r.height() < 0);
+
+ clip.setRect(r);
+}
+
DEF_TEST(AAClip, reporter) {
test_empty(reporter);
test_path_bounds(reporter);
@@ -419,4 +428,5 @@ DEF_TEST(AAClip, reporter) {
test_nearly_integral(reporter);
test_really_a_rect(reporter);
test_crbug_422693(reporter);
+ test_huge(reporter);
}