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 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 // are sent back to the main thread. | 966 // are sent back to the main thread. |
967 class LayerTreeHostAnimationTestScrollOffsetChangesArePropagated | 967 class LayerTreeHostAnimationTestScrollOffsetChangesArePropagated |
968 : public LayerTreeHostAnimationTest { | 968 : public LayerTreeHostAnimationTest { |
969 public: | 969 public: |
970 LayerTreeHostAnimationTestScrollOffsetChangesArePropagated() {} | 970 LayerTreeHostAnimationTestScrollOffsetChangesArePropagated() {} |
971 | 971 |
972 virtual void SetupTree() OVERRIDE { | 972 virtual void SetupTree() OVERRIDE { |
973 LayerTreeHostAnimationTest::SetupTree(); | 973 LayerTreeHostAnimationTest::SetupTree(); |
974 | 974 |
975 scroll_layer_ = FakeContentLayer::Create(&client_); | 975 scroll_layer_ = FakeContentLayer::Create(&client_); |
976 scroll_layer_->SetScrollable(true); | 976 scroll_layer_->SetScrollClipLayerId(layer_tree_host()->root_layer()->id()); |
977 scroll_layer_->SetBounds(gfx::Size(1000, 1000)); | 977 scroll_layer_->SetBounds(gfx::Size(1000, 1000)); |
978 scroll_layer_->SetScrollOffset(gfx::Vector2d(10, 20)); | 978 scroll_layer_->SetScrollOffset(gfx::Vector2d(10, 20)); |
979 layer_tree_host()->root_layer()->AddChild(scroll_layer_); | 979 layer_tree_host()->root_layer()->AddChild(scroll_layer_); |
980 } | 980 } |
981 | 981 |
982 virtual void BeginTest() OVERRIDE { | 982 virtual void BeginTest() OVERRIDE { |
983 PostSetNeedsCommitToMainThread(); | 983 PostSetNeedsCommitToMainThread(); |
984 } | 984 } |
985 | 985 |
986 virtual void DidCommit() OVERRIDE { | 986 virtual void DidCommit() OVERRIDE { |
(...skipping 22 matching lines...) Expand all Loading... |
1009 FakeContentLayerClient client_; | 1009 FakeContentLayerClient client_; |
1010 scoped_refptr<FakeContentLayer> scroll_layer_; | 1010 scoped_refptr<FakeContentLayer> scroll_layer_; |
1011 }; | 1011 }; |
1012 | 1012 |
1013 // SingleThreadProxy doesn't send scroll updates from LayerTreeHostImpl to | 1013 // SingleThreadProxy doesn't send scroll updates from LayerTreeHostImpl to |
1014 // LayerTreeHost. | 1014 // LayerTreeHost. |
1015 MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestScrollOffsetChangesArePropagated); | 1015 MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestScrollOffsetChangesArePropagated); |
1016 | 1016 |
1017 } // namespace | 1017 } // namespace |
1018 } // namespace cc | 1018 } // namespace cc |
OLD | NEW |