diff options
author | miletus <miletus@chromium.org> | 2015-06-11 15:11:01 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-11 22:11:28 +0000 |
commit | 843080ca2357f8441b77e3dd8a5aa32184f7b47a (patch) | |
tree | 9353c62e0eb64fdfb0a23246c1adc655fbdae4ca | |
parent | e8150cbd62e7c6b8289226e38e194cb8dbe229b3 (diff) | |
download | chromium_src-843080ca2357f8441b77e3dd8a5aa32184f7b47a.zip chromium_src-843080ca2357f8441b77e3dd8a5aa32184f7b47a.tar.gz chromium_src-843080ca2357f8441b77e3dd8a5aa32184f7b47a.tar.bz2 |
Rebuild property_tree after LayerImpl::SetTransform() is called in tests
This fixes test LayerTreeHostCommonTest.MaximumAnimationScaleFactor
If LayerImpl::SetTransform() is called, we need to rebuild/update the
property_tree.
In practice, LayerImpl::SetTransform() is only called through
LayerImpl::OnTransformAnimated(), where we already do property tree
update.
In test LayerImpl::SetTranform() can be triggered by itself, in
this case, lets just force a property rebuild.
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1179003002
Cr-Commit-Position: refs/heads/master@{#334050}
-rw-r--r-- | cc/trees/layer_tree_host_common_unittest.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc index c9ff620..fa9563f 100644 --- a/cc/trees/layer_tree_host_common_unittest.cc +++ b/cc/trees/layer_tree_host_common_unittest.cc @@ -8227,6 +8227,7 @@ TEST_F(LayerTreeHostCommonTest, MaximumAnimationScaleFactor) { scale_matrix.Scale(1.f, 2.f); grand_parent->SetTransform(scale_matrix); parent_raw->SetTransform(scale_matrix); + grand_parent->layer_tree_impl()->property_trees()->needs_rebuild = true; AddAnimatedTransformToLayer(parent_raw, 1.0, TransformOperations(), scale); ExecuteCalculateDrawProperties(grand_parent.get()); @@ -8245,6 +8246,7 @@ TEST_F(LayerTreeHostCommonTest, MaximumAnimationScaleFactor) { gfx::Transform perspective_matrix; perspective_matrix.ApplyPerspectiveDepth(2.f); child_raw->SetTransform(perspective_matrix); + grand_parent->layer_tree_impl()->property_trees()->needs_rebuild = true; ExecuteCalculateDrawProperties(grand_parent.get()); // |child| has a transform that's neither a translation nor a scale. @@ -8257,6 +8259,7 @@ TEST_F(LayerTreeHostCommonTest, MaximumAnimationScaleFactor) { 0.f, grand_child_raw->draw_properties().maximum_animation_contents_scale); parent_raw->SetTransform(perspective_matrix); + grand_parent->layer_tree_impl()->property_trees()->needs_rebuild = true; ExecuteCalculateDrawProperties(grand_parent.get()); // |parent| and |child| have transforms that are neither translations nor @@ -8272,6 +8275,7 @@ TEST_F(LayerTreeHostCommonTest, MaximumAnimationScaleFactor) { parent_raw->SetTransform(identity_matrix); child_raw->SetTransform(identity_matrix); grand_parent->SetTransform(perspective_matrix); + grand_parent->layer_tree_impl()->property_trees()->needs_rebuild = true; ExecuteCalculateDrawProperties(grand_parent.get()); |