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

Unified Diff: cc/math_util.cc

Issue 11635037: cc: When the transform's scale is unknown, draw render surfaces at the resolution of the screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 0. Created 8 years 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
« cc/layer_tree_host_common.cc ('K') | « cc/math_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/math_util.cc
diff --git a/cc/math_util.cc b/cc/math_util.cc
index 46d1c278253a72a1d62bc9311a13952180768cf1..38b609b162698e2b3330e2bd3ca2a8f2c5eed1e7 100644
--- a/cc/math_util.cc
+++ b/cc/math_util.cc
@@ -383,10 +383,10 @@ static inline float scaleOnAxis(double a, double b, double c)
return std::sqrt(a * a + b * b + c * c);
}
-gfx::Vector2dF MathUtil::computeTransform2dScaleComponents(const gfx::Transform& transform)
+gfx::Vector2dF MathUtil::computeTransform2dScaleComponents(const gfx::Transform& transform, float fallbackValue)
{
if (transform.HasPerspective())
- return gfx::Vector2dF(1, 1);
+ return gfx::Vector2dF(fallbackValue, fallbackValue);
float xScale = scaleOnAxis(transform.matrix().getDouble(0, 0), transform.matrix().getDouble(1, 0), transform.matrix().getDouble(2, 0));
float yScale = scaleOnAxis(transform.matrix().getDouble(0, 1), transform.matrix().getDouble(1, 1), transform.matrix().getDouble(2, 1));
return gfx::Vector2dF(xScale, yScale);
« cc/layer_tree_host_common.cc ('K') | « cc/math_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698