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/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/animation_host.h" | 8 #include "cc/animation/animation_host.h" |
9 #include "cc/animation/animation_id_provider.h" | 9 #include "cc/animation/animation_id_provider.h" |
10 #include "cc/animation/animation_player.h" | 10 #include "cc/animation/animation_player.h" |
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 ->layer_animation_controller() | 670 ->layer_animation_controller() |
671 ->GetAnimation(TargetProperty::SCROLL_OFFSET); | 671 ->GetAnimation(TargetProperty::SCROLL_OFFSET); |
672 | 672 |
673 if (!animation || animation->run_state() != Animation::RUNNING) { | 673 if (!animation || animation->run_state() != Animation::RUNNING) { |
674 host_impl->BlockNotifyReadyToActivateForTesting(false); | 674 host_impl->BlockNotifyReadyToActivateForTesting(false); |
675 return; | 675 return; |
676 } | 676 } |
677 | 677 |
678 // Block activation until the running animation has a chance to produce a | 678 // Block activation until the running animation has a chance to produce a |
679 // scroll delta. | 679 // scroll delta. |
680 gfx::Vector2dF scroll_delta = scroll_layer_impl->ScrollDelta(); | 680 gfx::Vector2dF scroll_delta = ScrollDelta(scroll_layer_impl); |
681 if (scroll_delta.x() < 1.f || scroll_delta.y() < 1.f) | 681 if (scroll_delta.x() < 1.f || scroll_delta.y() < 1.f) |
682 return; | 682 return; |
683 | 683 |
684 host_impl->BlockNotifyReadyToActivateForTesting(false); | 684 host_impl->BlockNotifyReadyToActivateForTesting(false); |
685 } | 685 } |
686 | 686 |
687 void WillActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { | 687 void WillActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { |
688 if (host_impl->pending_tree()->source_frame_number() != 1) | 688 if (host_impl->pending_tree()->source_frame_number() != 1) |
689 return; | 689 return; |
690 LayerImpl* scroll_layer_impl = | 690 LayerImpl* scroll_layer_impl = |
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1444 bool called_animation_finished_; | 1444 bool called_animation_finished_; |
1445 FakeContentLayerClient client_; | 1445 FakeContentLayerClient client_; |
1446 scoped_refptr<FakePictureLayer> picture_; | 1446 scoped_refptr<FakePictureLayer> picture_; |
1447 }; | 1447 }; |
1448 | 1448 |
1449 SINGLE_AND_MULTI_THREAD_TEST_F( | 1449 SINGLE_AND_MULTI_THREAD_TEST_F( |
1450 LayerTreeHostTimelinesTestNotifyAnimationFinished); | 1450 LayerTreeHostTimelinesTestNotifyAnimationFinished); |
1451 | 1451 |
1452 } // namespace | 1452 } // namespace |
1453 } // namespace cc | 1453 } // namespace cc |
OLD | NEW |