| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "cc/base/filter_operations.h" | 9 #include "cc/base/filter_operations.h" |
| 10 #include "cc/layers/heads_up_display_layer.h" | 10 #include "cc/layers/heads_up_display_layer.h" |
| (...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 hw_frame_provider_.set_frame(hw_video_frame_); | 966 hw_frame_provider_.set_frame(hw_video_frame_); |
| 967 scaled_hw_frame_provider_.set_frame(scaled_hw_video_frame_); | 967 scaled_hw_frame_provider_.set_frame(scaled_hw_video_frame_); |
| 968 | 968 |
| 969 // Enable the hud. | 969 // Enable the hud. |
| 970 LayerTreeDebugState debug_state; | 970 LayerTreeDebugState debug_state; |
| 971 debug_state.show_property_changed_rects = true; | 971 debug_state.show_property_changed_rects = true; |
| 972 layer_tree_host()->SetDebugState(debug_state); | 972 layer_tree_host()->SetDebugState(debug_state); |
| 973 | 973 |
| 974 scoped_refptr<PaintedScrollbarLayer> scrollbar = | 974 scoped_refptr<PaintedScrollbarLayer> scrollbar = |
| 975 PaintedScrollbarLayer::Create( | 975 PaintedScrollbarLayer::Create( |
| 976 std::unique_ptr<Scrollbar>(new FakeScrollbar), layer->id()); | 976 std::unique_ptr<Scrollbar>(new FakeScrollbar), layer->id(), |
| 977 layer->element_id()); |
| 977 scrollbar->SetBounds(gfx::Size(10, 10)); | 978 scrollbar->SetBounds(gfx::Size(10, 10)); |
| 978 scrollbar->SetIsDrawable(true); | 979 scrollbar->SetIsDrawable(true); |
| 979 root->AddChild(scrollbar); | 980 root->AddChild(scrollbar); |
| 980 | 981 |
| 981 layer_tree_host()->SetRootLayer(root); | 982 layer_tree_host()->SetRootLayer(root); |
| 982 LayerTreeHostContextTest::SetupTree(); | 983 LayerTreeHostContextTest::SetupTree(); |
| 983 } | 984 } |
| 984 | 985 |
| 985 void BeginTest() override { PostSetNeedsCommitToMainThread(); } | 986 void BeginTest() override { PostSetNeedsCommitToMainThread(); } |
| 986 | 987 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1081 }; | 1082 }; |
| 1082 | 1083 |
| 1083 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestImplSidePainting); | 1084 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestImplSidePainting); |
| 1084 | 1085 |
| 1085 class ScrollbarLayerLostContext : public LayerTreeHostContextTest { | 1086 class ScrollbarLayerLostContext : public LayerTreeHostContextTest { |
| 1086 public: | 1087 public: |
| 1087 ScrollbarLayerLostContext() : commits_(0) {} | 1088 ScrollbarLayerLostContext() : commits_(0) {} |
| 1088 | 1089 |
| 1089 void BeginTest() override { | 1090 void BeginTest() override { |
| 1090 scoped_refptr<Layer> scroll_layer = Layer::Create(); | 1091 scoped_refptr<Layer> scroll_layer = Layer::Create(); |
| 1091 scrollbar_layer_ = | 1092 scrollbar_layer_ = FakePaintedScrollbarLayer::Create( |
| 1092 FakePaintedScrollbarLayer::Create(false, true, scroll_layer->id()); | 1093 false, true, scroll_layer->id(), scroll_layer->element_id()); |
| 1093 scrollbar_layer_->SetBounds(gfx::Size(10, 100)); | 1094 scrollbar_layer_->SetBounds(gfx::Size(10, 100)); |
| 1094 layer_tree_host()->root_layer()->AddChild(scrollbar_layer_); | 1095 layer_tree_host()->root_layer()->AddChild(scrollbar_layer_); |
| 1095 layer_tree_host()->root_layer()->AddChild(scroll_layer); | 1096 layer_tree_host()->root_layer()->AddChild(scroll_layer); |
| 1096 PostSetNeedsCommitToMainThread(); | 1097 PostSetNeedsCommitToMainThread(); |
| 1097 } | 1098 } |
| 1098 | 1099 |
| 1099 void AfterTest() override {} | 1100 void AfterTest() override {} |
| 1100 | 1101 |
| 1101 void CommitCompleteOnThread(LayerTreeHostImpl* impl) override { | 1102 void CommitCompleteOnThread(LayerTreeHostImpl* impl) override { |
| 1102 LayerTreeHostContextTest::CommitCompleteOnThread(impl); | 1103 LayerTreeHostContextTest::CommitCompleteOnThread(impl); |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1638 | 1639 |
| 1639 FakeContentLayerClient client_; | 1640 FakeContentLayerClient client_; |
| 1640 int num_draws_ = 0; | 1641 int num_draws_ = 0; |
| 1641 }; | 1642 }; |
| 1642 | 1643 |
| 1643 MULTI_THREAD_TEST_F( | 1644 MULTI_THREAD_TEST_F( |
| 1644 LayerTreeHostContextTestLoseWorkerContextDuringPrepareTiles); | 1645 LayerTreeHostContextTestLoseWorkerContextDuringPrepareTiles); |
| 1645 | 1646 |
| 1646 } // namespace | 1647 } // namespace |
| 1647 } // namespace cc | 1648 } // namespace cc |
| OLD | NEW |