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

Unified Diff: cc/base/math_util.h

Issue 139233002: [#4] Pass gfx structs by const ref (gfx::PointF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Corrected as per review comments! 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 | « no previous file | 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 fd6f033da2f08ff4d677e76a7d2e1e734f03e5e7..bd089e1acea0f8bf9afd3a44cbf1c7b2c4be3b58 100644
--- a/cc/base/math_util.h
+++ b/cc/base/math_util.h
@@ -116,7 +116,7 @@ class CC_EXPORT MathUtil {
gfx::PointF clipped_quad[8],
int* num_vertices_in_clipped_quad);
- static gfx::RectF ComputeEnclosingRectOfVertices(gfx::PointF vertices[],
+ static gfx::RectF ComputeEnclosingRectOfVertices(const gfx::PointF vertices[],
int num_vertices);
static gfx::RectF ComputeEnclosingClippedRect(
const HomogeneousCoordinate& h1,
@@ -130,7 +130,7 @@ class CC_EXPORT MathUtil {
const gfx::QuadF& quad,
bool* clipped);
static gfx::PointF MapPoint(const gfx::Transform& transform,
- gfx::PointF point,
+ const gfx::PointF& point,
bool* clipped);
static gfx::Point3F MapPoint(const gfx::Transform&,
const gfx::Point3F&,
@@ -139,7 +139,7 @@ class CC_EXPORT MathUtil {
const gfx::QuadF& quad,
bool* clipped);
static gfx::PointF ProjectPoint(const gfx::Transform& transform,
- gfx::PointF point,
+ const gfx::PointF& point,
bool* clipped);
static gfx::Vector2dF ComputeTransform2dScaleComponents(const gfx::Transform&,
@@ -169,7 +169,7 @@ class CC_EXPORT MathUtil {
static scoped_ptr<base::Value> AsValue(gfx::SizeF s);
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::PointF& q);
static scoped_ptr<base::Value> AsValue(const gfx::QuadF& q);
static scoped_ptr<base::Value> AsValue(const gfx::RectF& rect);
static scoped_ptr<base::Value> AsValue(const gfx::Transform& transform);
« no previous file with comments | « no previous file | cc/base/math_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698