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