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

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: Converted constructors to row-major input 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
Index: cc/layer_tree_host_common.cc
diff --git a/cc/layer_tree_host_common.cc b/cc/layer_tree_host_common.cc
index 5af7a69732f6b133c510066ef6529b25d576b582..75a38c76efa1b3b5c9f21c9745db00cea3bc56a9 100644
--- a/cc/layer_tree_host_common.cc
+++ b/cc/layer_tree_host_common.cc
@@ -680,7 +680,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.
@@ -834,7 +834,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()) {

Powered by Google App Engine
This is Rietveld 408576698