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

Unified Diff: cc/layer_tree_host_common.cc

Issue 11774005: Migrate more functions from MathUtil to gfx::Transform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: try to fix double/float conversion errors Created 7 years, 11 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/layer_sorter_unittest.cc ('k') | cc/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_common.cc
diff --git a/cc/layer_tree_host_common.cc b/cc/layer_tree_host_common.cc
index c320d7a6ab83ea3bceadb7516c335b2cd55aa459..5746dde48523e81f92ddd34f97fe2486988c907a 100644
--- a/cc/layer_tree_host_common.cc
+++ b/cc/layer_tree_host_common.cc
@@ -691,7 +691,7 @@ static void calculateDrawPropertiesInternal(LayerType* layer, const gfx::Transfo
// layerScreenSpaceTransform represents the transform between root layer's "screen space" and local content space.
layerDrawProperties.screen_space_transform = fullHierarchyMatrix;
if (!layer->preserves3D())
- MathUtil::flattenTransformTo2d(layerDrawProperties.screen_space_transform);
+ layerDrawProperties.screen_space_transform.FlattenTo2d();
layerDrawProperties.screen_space_transform.PreconcatTransform(layerDrawProperties.target_space_transform);
// Adjusting text AA method during animation may cause repaints, which in-turn causes jank.
@@ -845,7 +845,7 @@ static void calculateDrawPropertiesInternal(LayerType* layer, const gfx::Transfo
// Flatten to 2D if the layer doesn't preserve 3D.
if (!layer->preserves3D())
- MathUtil::flattenTransformTo2d(sublayerMatrix);
+ sublayerMatrix.FlattenTo2d();
// Apply the sublayer transform at the center of the layer.
if (!layer->sublayerTransform().IsIdentity()) {
« no previous file with comments | « cc/layer_sorter_unittest.cc ('k') | cc/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698