Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: include/core/SkRect.h

Issue 2332733002: helper to SkRect to create from SkISize (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkRect.h
diff --git a/include/core/SkRect.h b/include/core/SkRect.h
index f25cac6e53dddc4890b61916a8fe99fefb038cb7..27a648feeb937d152e9c732ec9ec5f935410a9a9 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),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698