| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/trees/layer_tree_host_common.h" | 5 #include "cc/trees/layer_tree_host_common.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 : LayerTestCommon::LayerImplTest(VerifyTreeCalcsLayerTreeSettings()) {} | 73 : LayerTestCommon::LayerImplTest(VerifyTreeCalcsLayerTreeSettings()) {} |
| 74 explicit LayerTreeHostCommonTestBase(const LayerTreeSettings& settings) | 74 explicit LayerTreeHostCommonTestBase(const LayerTreeSettings& settings) |
| 75 : LayerTestCommon::LayerImplTest(settings) {} | 75 : LayerTestCommon::LayerImplTest(settings) {} |
| 76 | 76 |
| 77 static void SetScrollOffsetDelta(LayerImpl* layer_impl, | 77 static void SetScrollOffsetDelta(LayerImpl* layer_impl, |
| 78 const gfx::Vector2dF& delta) { | 78 const gfx::Vector2dF& delta) { |
| 79 if (layer_impl->layer_tree_impl() | 79 if (layer_impl->layer_tree_impl() |
| 80 ->property_trees() | 80 ->property_trees() |
| 81 ->scroll_tree.SetScrollOffsetDeltaForTesting(layer_impl->id(), | 81 ->scroll_tree.SetScrollOffsetDeltaForTesting(layer_impl->id(), |
| 82 delta)) | 82 delta)) |
| 83 layer_impl->layer_tree_impl()->DidUpdateScrollOffset( | 83 layer_impl->layer_tree_impl()->DidUpdateScrollOffset(layer_impl->id()); |
| 84 layer_impl->id(), layer_impl->transform_tree_index()); | |
| 85 } | 84 } |
| 86 | 85 |
| 87 static float GetMaximumAnimationScale(LayerImpl* layer_impl) { | 86 static float GetMaximumAnimationScale(LayerImpl* layer_impl) { |
| 88 return layer_impl->layer_tree_impl() | 87 return layer_impl->layer_tree_impl() |
| 89 ->property_trees() | 88 ->property_trees() |
| 90 ->GetAnimationScales(layer_impl->transform_tree_index(), | 89 ->GetAnimationScales(layer_impl->transform_tree_index(), |
| 91 layer_impl->layer_tree_impl()) | 90 layer_impl->layer_tree_impl()) |
| 92 .maximum_animation_scale; | 91 .maximum_animation_scale; |
| 93 } | 92 } |
| 94 | 93 |
| (...skipping 9743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9838 EXPECT_EQ(scroll_child6.id, grand_child10->scroll_tree_index()); | 9837 EXPECT_EQ(scroll_child6.id, grand_child10->scroll_tree_index()); |
| 9839 EXPECT_EQ(scroll_root1.id, parent3->scroll_tree_index()); | 9838 EXPECT_EQ(scroll_root1.id, parent3->scroll_tree_index()); |
| 9840 EXPECT_EQ(scroll_child7.id, child8->scroll_tree_index()); | 9839 EXPECT_EQ(scroll_child7.id, child8->scroll_tree_index()); |
| 9841 EXPECT_EQ(scroll_root1.id, parent4->scroll_tree_index()); | 9840 EXPECT_EQ(scroll_root1.id, parent4->scroll_tree_index()); |
| 9842 EXPECT_EQ(scroll_root1.id, child9->scroll_tree_index()); | 9841 EXPECT_EQ(scroll_root1.id, child9->scroll_tree_index()); |
| 9843 EXPECT_EQ(scroll_root1.id, grand_child12->scroll_tree_index()); | 9842 EXPECT_EQ(scroll_root1.id, grand_child12->scroll_tree_index()); |
| 9844 } | 9843 } |
| 9845 | 9844 |
| 9846 } // namespace | 9845 } // namespace |
| 9847 } // namespace cc | 9846 } // namespace cc |
| OLD | NEW |