| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ | 5 #ifndef CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ |
| 6 #define CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ | 6 #define CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 protected: | 135 protected: |
| 136 static void SetScrollOffsetDelta(LayerImpl* layer_impl, | 136 static void SetScrollOffsetDelta(LayerImpl* layer_impl, |
| 137 const gfx::Vector2dF& delta) { | 137 const gfx::Vector2dF& delta) { |
| 138 if (layer_impl->layer_tree_impl() | 138 if (layer_impl->layer_tree_impl() |
| 139 ->property_trees() | 139 ->property_trees() |
| 140 ->scroll_tree.SetScrollOffsetDeltaForTesting(layer_impl->id(), | 140 ->scroll_tree.SetScrollOffsetDeltaForTesting(layer_impl->id(), |
| 141 delta)) | 141 delta)) |
| 142 layer_impl->layer_tree_impl()->DidUpdateScrollOffset( | 142 layer_impl->layer_tree_impl()->DidUpdateScrollOffset( |
| 143 layer_impl->id(), layer_impl->transform_tree_index()); | 143 layer_impl->id(), layer_impl->transform_tree_index()); |
| 144 } | 144 } |
| 145 |
| 146 static float GetMaximumAnimationScale(LayerImpl* layer_impl) { |
| 147 return layer_impl->layer_tree_impl() |
| 148 ->property_trees() |
| 149 ->GetAnimationScales(layer_impl->transform_tree_index(), |
| 150 layer_impl->layer_tree_impl()) |
| 151 .maximum_animation_scale; |
| 152 } |
| 153 |
| 154 static float GetStartingAnimationScale(LayerImpl* layer_impl) { |
| 155 return layer_impl->layer_tree_impl() |
| 156 ->property_trees() |
| 157 ->GetAnimationScales(layer_impl->transform_tree_index(), |
| 158 layer_impl->layer_tree_impl()) |
| 159 .starting_animation_scale; |
| 160 } |
| 145 }; | 161 }; |
| 146 | 162 |
| 147 } // namespace cc | 163 } // namespace cc |
| 148 | 164 |
| 149 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ | 165 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ |
| OLD | NEW |