diff options
author | Mike Reed <reed@google.com> | 2017-01-24 09:13:40 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-01-24 14:51:24 +0000 |
commit | 6f4a9b294868a94e5b1e06a8e855833614355bcc (patch) | |
tree | 63ee9658f09451469131a0486b9314f2746d9cf8 /include | |
parent | eb5061baac840e5aa9849985394654b70430fd41 (diff) |
restore bool version of clip-bounds
BUG=skia:
Change-Id: I94e35566cf5bcd250515c71a566dd79030e2acb4
Reviewed-on: https://skia-review.googlesource.com/7430
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkCanvas.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index a1d652db06..13b3bc6f77 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -533,11 +533,27 @@ public: SkRect getLocalClipBounds() const { return this->onGetLocalClipBounds(); } /** + * Returns true if the clip bounds are non-empty. + */ + bool getLocalClipBounds(SkRect* bounds) const { + *bounds = this->onGetLocalClipBounds(); + return !bounds->isEmpty(); + } + + /** * Return the bounds of the current clip in device coordinates. If the clip is empty, * return { 0, 0, 0, 0 }. */ SkIRect getDeviceClipBounds() const { return this->onGetDeviceClipBounds(); } + /** + * Returns true if the clip bounds are non-empty. + */ + bool getDeviceClipBounds(SkIRect* bounds) const { + *bounds = this->onGetDeviceClipBounds(); + return !bounds->isEmpty(); + } + #ifdef SK_SUPPORT_LEGACY_GETCLIPBOUNDS bool getClipBounds(SkRect* bounds) const { SkRect r = this->getLocalClipBounds(); |