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

Unified Diff: cc/base/math_util.h

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/invalidation_region.cc ('k') | cc/base/math_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/base/math_util.h
diff --git a/cc/base/math_util.h b/cc/base/math_util.h
index baceb7058fe3a51b028a8bbe8f3b80daf3f94e9a..fd6f033da2f08ff4d677e76a7d2e1e734f03e5e7 100644
--- a/cc/base/math_util.h
+++ b/cc/base/math_util.h
@@ -100,7 +100,7 @@ class CC_EXPORT MathUtil {
// These functions return the axis-aligned rect that encloses the correctly
// clipped, transformed polygon.
static gfx::Rect MapClippedRect(const gfx::Transform& transform,
- gfx::Rect rect);
+ const gfx::Rect& rect);
static gfx::RectF MapClippedRect(const gfx::Transform& transform,
const gfx::RectF& rect);
static gfx::RectF ProjectClippedRect(const gfx::Transform& transform,
@@ -167,7 +167,7 @@ class CC_EXPORT MathUtil {
// Conversion to value.
static scoped_ptr<base::Value> AsValue(gfx::Size s);
static scoped_ptr<base::Value> AsValue(gfx::SizeF s);
- static scoped_ptr<base::Value> AsValue(gfx::Rect r);
+ static scoped_ptr<base::Value> AsValue(const gfx::Rect& r);
static bool FromValue(const base::Value*, gfx::Rect* out_rect);
static scoped_ptr<base::Value> AsValue(gfx::PointF q);
static scoped_ptr<base::Value> AsValue(const gfx::QuadF& q);
« no previous file with comments | « cc/base/invalidation_region.cc ('k') | cc/base/math_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698