diff options
author | Hal Canary <halcanary@google.com> | 2018-04-06 10:25:12 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-06 16:37:23 +0000 |
commit | 13872ddc56c4ab128569428b3ea8c722e7494df5 (patch) | |
tree | 9cc10636ced3893c720ebc08ef8b600a06bd34f2 /src/core/SkRegion.cpp | |
parent | 4c2393493ad6d5f72eecd1190fee20cce732b959 (diff) |
Region Op Fuzzer
Also: assert Region IRects don't contain Sentinel value.
Also: Region fuzzer can't produce Sentinel value.
Change-Id: Ia33c7eeb9ef2c46b3da4a025d85de8a0406c3c0c
Reviewed-on: https://skia-review.googlesource.com/119011
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Diffstat (limited to 'src/core/SkRegion.cpp')
-rw-r--r-- | src/core/SkRegion.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/SkRegion.cpp b/src/core/SkRegion.cpp index 8ba3167297..204e35479d 100644 --- a/src/core/SkRegion.cpp +++ b/src/core/SkRegion.cpp @@ -145,6 +145,10 @@ bool SkRegion::setRect(const SkIRect& r) { return this->setEmpty(); } this->freeRuns(); + SkASSERT(r.left() != SkRegion::kRunTypeSentinel); + SkASSERT(r.top() != SkRegion::kRunTypeSentinel); + SkASSERT(r.right() != SkRegion::kRunTypeSentinel); + SkASSERT(r.bottom() != SkRegion::kRunTypeSentinel); fBounds = r; fRunHead = SkRegion_gRectRunHeadPtr; return true; |