diff options
author | reed <reed@google.com> | 2016-09-12 06:32:07 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-12 06:32:07 -0700 |
commit | 2a78fca05416a13bad1b680b52d0ed4fc7f84762 (patch) | |
tree | b7553a30016ee66a3cfe29a1db843a733fe7795c /include/core/SkRect.h | |
parent | fe69b5037817fdf4e64e96ca8b2b50eae6ed4f2c (diff) |
helper to SkRect to create from SkISize
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2332733002
TBR=
NOTREECHECKS=True
NOTRY=True
Review-Url: https://codereview.chromium.org/2332733002
Diffstat (limited to 'include/core/SkRect.h')
-rw-r--r-- | include/core/SkRect.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/core/SkRect.h b/include/core/SkRect.h index f25cac6e53..27a648feeb 100644 --- a/include/core/SkRect.h +++ b/include/core/SkRect.h @@ -439,6 +439,10 @@ struct SK_API SkRect { return r; } + static SkRect Make(const SkISize& size) { + return MakeIWH(size.width(), size.height()); + } + static SkRect SK_WARN_UNUSED_RESULT Make(const SkIRect& irect) { SkRect r; r.set(SkIntToScalar(irect.fLeft), |