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

Unified Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 2269143003: cc : Add OnTransformAnimated to transform tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 | « cc/trees/damage_tracker_unittest.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common_unittest.cc
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
index ff73a5ab808e4ec0df1026e714fa30fd21f04945..625f6c5538e707243866e351cb2e4c000afbc31c 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -6285,15 +6285,21 @@ TEST_F(LayerTreeHostCommonTest, TransformAnimationUpdatesBackfaceVisibility) {
EXPECT_TRUE(tree.Node(render_surface2->effect_tree_index())
->hidden_by_backface_visibility);
- back_facing->OnTransformAnimated(gfx::Transform());
- render_surface2->OnTransformAnimated(rotate_about_y);
+ root->layer_tree_impl()->property_trees()->transform_tree.OnTransformAnimated(
+ gfx::Transform(), back_facing->transform_tree_index(),
+ root->layer_tree_impl());
+ root->layer_tree_impl()->property_trees()->transform_tree.OnTransformAnimated(
+ rotate_about_y, render_surface2->transform_tree_index(),
+ root->layer_tree_impl());
ExecuteCalculateDrawProperties(root);
EXPECT_FALSE(tree.Node(render_surface1->effect_tree_index())
->hidden_by_backface_visibility);
EXPECT_TRUE(tree.Node(render_surface2->effect_tree_index())
->hidden_by_backface_visibility);
- render_surface1->OnTransformAnimated(rotate_about_y);
+ root->layer_tree_impl()->property_trees()->transform_tree.OnTransformAnimated(
+ rotate_about_y, render_surface1->transform_tree_index(),
+ root->layer_tree_impl());
ExecuteCalculateDrawProperties(root);
EXPECT_TRUE(tree.Node(render_surface1->effect_tree_index())
->hidden_by_backface_visibility);
@@ -7692,7 +7698,11 @@ TEST_F(LayerTreeHostCommonTest, AnimationScales) {
// Correctly updates animation scale when layer property changes.
child1_layer->test_properties()->transform = gfx::Transform();
- child1_layer->UpdatePropertyTreeTransform(gfx::Transform());
+ root_layer->layer_tree_impl()
+ ->property_trees()
+ ->transform_tree.OnTransformAnimated(gfx::Transform(),
+ child1_layer->transform_tree_index(),
+ root_layer->layer_tree_impl());
root_layer->layer_tree_impl()->property_trees()->needs_rebuild = false;
ExecuteCalculateDrawProperties(root_layer);
EXPECT_FLOAT_EQ(8.f, GetMaximumAnimationScale(child2_layer));
@@ -7971,7 +7981,8 @@ TEST_F(LayerTreeHostCommonTest,
gfx::Transform zero_matrix;
zero_matrix.Scale3d(0.f, 0.f, 0.f);
- animated->OnTransformAnimated(zero_matrix);
+ root->layer_tree_impl()->property_trees()->transform_tree.OnTransformAnimated(
+ zero_matrix, animated->transform_tree_index(), root->layer_tree_impl());
ExecuteCalculateDrawPropertiesWithPropertyTrees(root);
// The animated layer maps to the empty rect in clipped target space, so is
« no previous file with comments | « cc/trees/damage_tracker_unittest.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698