OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/test/animation_timelines_test_common.h" | 5 #include "cc/test/animation_timelines_test_common.h" |
6 | 6 |
7 #include "cc/animation/animation_events.h" | 7 #include "cc/animation/animation_events.h" |
8 #include "cc/animation/animation_id_provider.h" | 8 #include "cc/animation/animation_id_provider.h" |
9 #include "cc/animation/animation_player.h" | 9 #include "cc/animation/animation_player.h" |
10 #include "cc/animation/animation_registrar.h" | 10 #include "cc/animation/animation_registrar.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 } | 91 } |
92 | 92 |
93 void TestHostClient::SetLayerScrollOffsetMutated( | 93 void TestHostClient::SetLayerScrollOffsetMutated( |
94 int layer_id, | 94 int layer_id, |
95 LayerTreeType tree_type, | 95 LayerTreeType tree_type, |
96 const gfx::ScrollOffset& scroll_offset) { | 96 const gfx::ScrollOffset& scroll_offset) { |
97 TestLayer* layer = FindTestLayer(layer_id, tree_type); | 97 TestLayer* layer = FindTestLayer(layer_id, tree_type); |
98 layer->set_scroll_offset(scroll_offset); | 98 layer->set_scroll_offset(scroll_offset); |
99 } | 99 } |
100 | 100 |
| 101 gfx::ScrollOffset TestHostClient::GetScrollOffsetForAnimation( |
| 102 int layer_id) const { |
| 103 return gfx::ScrollOffset(); |
| 104 } |
| 105 |
101 void TestHostClient::RegisterLayer(int layer_id, LayerTreeType tree_type) { | 106 void TestHostClient::RegisterLayer(int layer_id, LayerTreeType tree_type) { |
102 LayerIdToTestLayer& layers_in_tree = tree_type == LayerTreeType::ACTIVE | 107 LayerIdToTestLayer& layers_in_tree = tree_type == LayerTreeType::ACTIVE |
103 ? layers_in_active_tree_ | 108 ? layers_in_active_tree_ |
104 : layers_in_pending_tree_; | 109 : layers_in_pending_tree_; |
105 DCHECK(layers_in_tree.find(layer_id) == layers_in_tree.end()); | 110 DCHECK(layers_in_tree.find(layer_id) == layers_in_tree.end()); |
106 layers_in_tree.add(layer_id, TestLayer::Create()); | 111 layers_in_tree.add(layer_id, TestLayer::Create()); |
107 | 112 |
108 DCHECK(host_); | 113 DCHECK(host_); |
109 host_->RegisterLayer(layer_id, tree_type); | 114 host_->RegisterLayer(layer_id, tree_type); |
110 } | 115 } |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 } | 252 } |
248 | 253 |
249 AnimationPlayer* AnimationTimelinesTest::GetImplPlayerForLayerId(int layer_id) { | 254 AnimationPlayer* AnimationTimelinesTest::GetImplPlayerForLayerId(int layer_id) { |
250 const ElementAnimations* element_animations = | 255 const ElementAnimations* element_animations = |
251 host_impl_->GetElementAnimationsForLayerId(layer_id); | 256 host_impl_->GetElementAnimationsForLayerId(layer_id); |
252 return element_animations ? element_animations->players_list().head()->value() | 257 return element_animations ? element_animations->players_list().head()->value() |
253 : nullptr; | 258 : nullptr; |
254 } | 259 } |
255 | 260 |
256 } // namespace cc | 261 } // namespace cc |
OLD | NEW |