diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-02-24 19:38:20 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-02-24 19:38:20 +0000 |
commit | 754de5f65b466f721d952a379194cc94de376f42 (patch) | |
tree | 957283b1b7ebd32bab0b8c5a943942aa39a5360f /src | |
parent | 5cc25359c62c83c356c3a30572a05ac9647daa55 (diff) |
add isClipEmpty() -- encourage clients to call this rather than checking clipFoo() results
BUG=skia:
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/177073006
git-svn-id: http://skia.googlecode.com/svn/trunk@13568 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkCanvas.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 1e9dda3098..8159adf0ee 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -1484,6 +1484,10 @@ void SkCanvas::replayClips(ClipVisitor* visitor) const { /////////////////////////////////////////////////////////////////////////////// +bool SkCanvas::isClipEmpty() const { + return fMCRec->fRasterClip->isEmpty(); +} + bool SkCanvas::quickReject(const SkRect& rect) const { if (!rect.isFinite()) |