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

Unified Diff: ui/gfx/skia_util.cc

Issue 9500001: ui/gfx: Simplify RectToSkRect() implementation by using iset() function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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: ui/gfx/skia_util.cc
diff --git a/ui/gfx/skia_util.cc b/ui/gfx/skia_util.cc
index 320fd6b43202cbfe877546157802043c35fc3c42..3c179bcf88235e13155bb5ec332fd2ab1a3712bc 100644
--- a/ui/gfx/skia_util.cc
+++ b/ui/gfx/skia_util.cc
@@ -15,8 +15,7 @@ namespace gfx {
SkRect RectToSkRect(const gfx::Rect& rect) {
SkRect r;
- r.set(SkIntToScalar(rect.x()), SkIntToScalar(rect.y()),
- SkIntToScalar(rect.right()), SkIntToScalar(rect.bottom()));
+ r.iset(rect.x(), rect.y(), rect.right(), rect.bottom());
return r;
}
@@ -26,8 +25,8 @@ SkIRect RectToSkIRect(const gfx::Rect& rect) {
}
gfx::Rect SkRectToRect(const SkRect& rect) {
- return gfx::Rect(static_cast<int>(rect.fLeft),
- static_cast<int>(rect.fTop),
+ return gfx::Rect(static_cast<int>(rect.left()),
+ static_cast<int>(rect.top()),
static_cast<int>(rect.width()),
static_cast<int>(rect.height()));
}
« 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