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

Unified Diff: cc/base/math_util.cc

Issue 12912010: cc: Convert non-const reference arguments to pointers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ui/compositor Created 7 years, 9 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 623ff7b7a47886efb559c14b8b8ea644591c4810..9dacdb9dfbf3a2b6da9cb43ebfd500feff62e280 100644
--- a/cc/base/math_util.cc
+++ b/cc/base/math_util.cc
@@ -135,9 +135,9 @@ static inline void ExpandBoundsToIncludePoint(float* xmin,
static inline void AddVertexToClippedQuad(gfx::PointF new_vertex,
gfx::PointF clipped_quad[8],
- int& num_vertices_in_clipped_quad) {
- clipped_quad[num_vertices_in_clipped_quad] = new_vertex;
- num_vertices_in_clipped_quad++;
+ int* num_vertices_in_clipped_quad) {
+ clipped_quad[*num_vertices_in_clipped_quad] = new_vertex;
+ (*num_vertices_in_clipped_quad)++;
}
gfx::Rect MathUtil::MapClippedRect(const gfx::Transform& transform,
@@ -197,7 +197,7 @@ gfx::RectF MathUtil::ProjectClippedRect(const gfx::Transform& transform,
void MathUtil::MapClippedQuad(const gfx::Transform& transform,
const gfx::QuadF& src_quad,
gfx::PointF clipped_quad[8],
- int& num_vertices_in_clipped_quad) {
+ int* num_vertices_in_clipped_quad) {
HomogeneousCoordinate h1 =
MapHomogeneousPoint(transform, gfx::Point3F(src_quad.p1()));
HomogeneousCoordinate h2 =
@@ -210,7 +210,7 @@ void MathUtil::MapClippedQuad(const gfx::Transform& transform,
// The order of adding the vertices to the array is chosen so that
// clockwise / counter-clockwise orientation is retained.
- num_vertices_in_clipped_quad = 0;
+ *num_vertices_in_clipped_quad = 0;
if (!h1.ShouldBeClipped()) {
AddVertexToClippedQuad(
@@ -260,7 +260,7 @@ void MathUtil::MapClippedQuad(const gfx::Transform& transform,
num_vertices_in_clipped_quad);
}
- DCHECK_LE(num_vertices_in_clipped_quad, 8);
+ DCHECK_LE(*num_vertices_in_clipped_quad, 8);
}
gfx::RectF MathUtil::ComputeEnclosingRectOfVertices(gfx::PointF vertices[],
« 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