Chromium Code Reviews| Index: cc/base/math_util.cc |
| diff --git a/cc/base/math_util.cc b/cc/base/math_util.cc |
| index f7ccd43a6a362beb35fa0bf547087d178214a604..c1f2614d110419a4b2cde444487dee87435d3b29 100644 |
| --- a/cc/base/math_util.cc |
| +++ b/cc/base/math_util.cc |
| @@ -178,7 +178,7 @@ static inline bool IsNearlyTheSame(const gfx::Point3F& lhs, |
| } |
| static inline void AddVertexToClippedQuad3d(const gfx::Point3F& new_vertex, |
| - gfx::Point3F clipped_quad[8], |
| + gfx::Point3F clipped_quad[6], |
| int* num_vertices_in_clipped_quad) { |
| if (*num_vertices_in_clipped_quad > 0 && |
| IsNearlyTheSame(clipped_quad[*num_vertices_in_clipped_quad - 1], |
| @@ -309,7 +309,7 @@ gfx::Rect MathUtil::MapEnclosedRectWith2dAxisAlignedTransform( |
| bool MathUtil::MapClippedQuad3d(const gfx::Transform& transform, |
| const gfx::QuadF& src_quad, |
| - gfx::Point3F clipped_quad[8], |
| + gfx::Point3F clipped_quad[6], |
| int* num_vertices_in_clipped_quad) { |
| HomogeneousCoordinate h1 = |
| MapHomogeneousPoint(transform, gfx::Point3F(src_quad.p1())); |
| @@ -370,7 +370,7 @@ bool MathUtil::MapClippedQuad3d(const gfx::Transform& transform, |
| clipped_quad[*num_vertices_in_clipped_quad - 1])) |
| *num_vertices_in_clipped_quad -= 1; |
| - DCHECK_LE(*num_vertices_in_clipped_quad, 8); |
| + DCHECK_LE(*num_vertices_in_clipped_quad, 6); |
|
flackr
2017/01/12 16:59:11
I'm concerned with the DCHECK that if we got this
danakj
2017/01/12 17:01:19
Can we not just find a provably correct number?
|
| return (*num_vertices_in_clipped_quad >= 4); |
| } |