diff options
author | reed <reed@google.com> | 2014-08-07 11:19:11 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-07 11:19:11 -0700 |
commit | 0aeea6d344f12e35e29a79f4bbc48af88f913204 (patch) | |
tree | 8f70b9217293ba30fc9425159b70f50ee25ee47e /src/core/SkAAClip.cpp | |
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 'src/core/SkAAClip.cpp')
-rw-r--r-- | src/core/SkAAClip.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/core/SkAAClip.cpp b/src/core/SkAAClip.cpp index 54a6dcd795..14152f8317 100644 --- a/src/core/SkAAClip.cpp +++ b/src/core/SkAAClip.cpp @@ -684,35 +684,6 @@ bool SkAAClip::setRect(const SkIRect& bounds) { #endif } -bool SkAAClip::isRect() const { - if (this->isEmpty()) { - return false; - } - - const RunHead* head = fRunHead; - if (head->fRowCount != 1) { - return false; - } - const YOffset* yoff = head->yoffsets(); - if (yoff->fY != fBounds.fBottom - 1) { - return false; - } - SkASSERT(0 == yoff->fOffset); - - const uint8_t* row = head->data(); - int width = fBounds.width(); - do { - if (row[1] != 0xFF) { - return false; - } - int n = row[0]; - SkASSERT(n <= width); - width -= n; - row += 2; - } while (width > 0); - return true; -} - bool SkAAClip::setRect(const SkRect& r, bool doAA) { if (r.isEmpty()) { return this->setEmpty(); |