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

Unified Diff: cc/base/math_util.cc

Issue 93663004: [#2] Pass gfx structs by const ref (gfx::Rect, gfx::RectF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT, fix builds on non-linux platforms! Created 6 years, 11 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 | « cc/base/math_util.h ('k') | cc/base/region.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/base/math_util.cc
diff --git a/cc/base/math_util.cc b/cc/base/math_util.cc
index 7a1bc1a8674287b6a581457fe1ffe53bfd31e816..0cc120d89094c818e72f6480711c6e3a5ed1e99a 100644
--- a/cc/base/math_util.cc
+++ b/cc/base/math_util.cc
@@ -102,7 +102,7 @@ static inline void AddVertexToClippedQuad(gfx::PointF new_vertex,
}
gfx::Rect MathUtil::MapClippedRect(const gfx::Transform& transform,
- gfx::Rect src_rect) {
+ const gfx::Rect& src_rect) {
return gfx::ToEnclosingRect(MapClippedRect(transform, gfx::RectF(src_rect)));
}
@@ -521,7 +521,7 @@ scoped_ptr<base::Value> MathUtil::AsValue(gfx::SizeF s) {
return res.PassAs<base::Value>();
}
-scoped_ptr<base::Value> MathUtil::AsValue(gfx::Rect r) {
+scoped_ptr<base::Value> MathUtil::AsValue(const gfx::Rect& r) {
scoped_ptr<base::ListValue> res(new base::ListValue());
res->AppendInteger(r.x());
res->AppendInteger(r.y());
« no previous file with comments | « cc/base/math_util.h ('k') | cc/base/region.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698