| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include "cc/animation/animation_curve.h" | 7 #include "cc/animation/animation_curve.h" |
| 8 #include "cc/animation/layer_animation_controller.h" | 8 #include "cc/animation/layer_animation_controller.h" |
| 9 #include "cc/animation/scroll_offset_animation_curve.h" | 9 #include "cc/animation/scroll_offset_animation_curve.h" |
| 10 #include "cc/animation/timing_function.h" | 10 #include "cc/animation/timing_function.h" |
| (...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1096 host_impl->BlockNotifyReadyToActivateForTesting(false); | 1096 host_impl->BlockNotifyReadyToActivateForTesting(false); |
| 1097 } | 1097 } |
| 1098 | 1098 |
| 1099 void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { | 1099 void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { |
| 1100 LayerImpl* scroll_layer_impl = | 1100 LayerImpl* scroll_layer_impl = |
| 1101 host_impl->active_tree()->root_layer()->children()[0]; | 1101 host_impl->active_tree()->root_layer()->children()[0]; |
| 1102 if (scroll_layer_impl->layer_animation_controller()->GetAnimation( | 1102 if (scroll_layer_impl->layer_animation_controller()->GetAnimation( |
| 1103 Animation::ScrollOffset)) | 1103 Animation::ScrollOffset)) |
| 1104 return; | 1104 return; |
| 1105 | 1105 |
| 1106 EXPECT_EQ(final_postion_, scroll_layer_impl->TotalScrollOffset()); | 1106 EXPECT_EQ(final_postion_, scroll_layer_impl->CurrentScrollOffset()); |
| 1107 EndTest(); | 1107 EndTest(); |
| 1108 } | 1108 } |
| 1109 | 1109 |
| 1110 void AfterTest() override { | 1110 void AfterTest() override { |
| 1111 EXPECT_EQ(final_postion_, scroll_layer_->scroll_offset()); | 1111 EXPECT_EQ(final_postion_, scroll_layer_->scroll_offset()); |
| 1112 } | 1112 } |
| 1113 | 1113 |
| 1114 private: | 1114 private: |
| 1115 FakeContentLayerClient client_; | 1115 FakeContentLayerClient client_; |
| 1116 scoped_refptr<FakeContentLayer> scroll_layer_; | 1116 scoped_refptr<FakeContentLayer> scroll_layer_; |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1264 private: | 1264 private: |
| 1265 scoped_refptr<Layer> content_; | 1265 scoped_refptr<Layer> content_; |
| 1266 int num_swap_buffers_; | 1266 int num_swap_buffers_; |
| 1267 }; | 1267 }; |
| 1268 | 1268 |
| 1269 SINGLE_AND_MULTI_THREAD_TEST_F( | 1269 SINGLE_AND_MULTI_THREAD_TEST_F( |
| 1270 LayerTreeHostAnimationTestAddAnimationAfterAnimating); | 1270 LayerTreeHostAnimationTestAddAnimationAfterAnimating); |
| 1271 | 1271 |
| 1272 } // namespace | 1272 } // namespace |
| 1273 } // namespace cc | 1273 } // namespace cc |
| OLD | NEW |