Chromium Code Reviews| Index: cc/base/math_util.h |
| diff --git a/cc/base/math_util.h b/cc/base/math_util.h |
| index 486a654a5e49a76e9483f350760a61b500dc9732..1f5f5e03dce74f76e8f0a5c41901faed0fbf8ed3 100644 |
| --- a/cc/base/math_util.h |
| +++ b/cc/base/math_util.h |
| @@ -108,13 +108,25 @@ class CC_EXPORT MathUtil { |
| // clipped, transformed polygon. |
| static gfx::Rect MapEnclosingClippedRect(const gfx::Transform& transform, |
| const gfx::Rect& rect); |
| + static gfx::Rect MapEnclosedClippedRect(const gfx::Transform& transform, |
| + const gfx::Rect& rect); |
| static gfx::RectF MapClippedRect(const gfx::Transform& transform, |
| const gfx::RectF& rect); |
| static gfx::Rect ProjectEnclosingClippedRect(const gfx::Transform& transform, |
| const gfx::Rect& rect); |
| + static gfx::Rect ProjectEnclosedClippedRect(const gfx::Transform& transform, |
| + const gfx::Rect& rect); |
| static gfx::RectF ProjectClippedRect(const gfx::Transform& transform, |
| const gfx::RectF& rect); |
| + // These functions are only valid to call for inputs where it is known they |
| + // will not require clipping in homogeneous coordinates. |
| + static gfx::Rect MapEnclosedNonClippedRect(const gfx::Transform& transform, |
|
enne (OOO)
2014/08/21 17:54:05
Is it worth having unit tests for these functions?
danakj
2014/08/21 17:58:08
Ya I will write tests but I am not happy with the
|
| + const gfx::Rect& rect); |
| + static gfx::Rect ProjectEnclosedNonClippedRect( |
| + const gfx::Transform& transform, |
| + const gfx::Rect& rect); |
| + |
| // Returns an array of vertices that represent the clipped polygon. After |
| // returning, indexes from 0 to num_vertices_in_clipped_quad are valid in the |
| // clipped_quad array. Note that num_vertices_in_clipped_quad may be zero, |