helper to SkRect to create from SkISize
authorreed <reed@google.com>
Mon, 12 Sep 2016 13:32:07 +0000 (06:32 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 12 Sep 2016 13:32:07 +0000 (06:32 -0700)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2332733002

TBR=
NOTREECHECKS=True
NOTRY=True

Review-Url: https://codereview.chromium.org/2332733002

include/core/SkRect.h

index f25cac6..27a648f 100644 (file)
@@ -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),