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

Unified Diff: cc/base/math_util.h

Issue 495873002: cc: Stop converting Rect to QuadF to map to an enclosed rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: enclosed-rect: . Created 6 years, 4 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') | cc/base/math_util.cc » ('J')
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 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,
« no previous file with comments | « no previous file | cc/base/math_util.cc » ('j') | cc/base/math_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698