Chromium Code Reviews| 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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "cc/layers/content_layer.h" | 8 #include "cc/layers/content_layer.h" |
| 9 #include "cc/layers/delegated_frame_provider.h" | 9 #include "cc/layers/delegated_frame_provider.h" |
| 10 #include "cc/layers/delegated_frame_resource_collection.h" | 10 #include "cc/layers/delegated_frame_resource_collection.h" |
| (...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1242 root->AddChild(io_surface); | 1242 root->AddChild(io_surface); |
| 1243 } | 1243 } |
| 1244 | 1244 |
| 1245 // Enable the hud. | 1245 // Enable the hud. |
| 1246 LayerTreeDebugState debug_state; | 1246 LayerTreeDebugState debug_state; |
| 1247 debug_state.show_property_changed_rects = true; | 1247 debug_state.show_property_changed_rects = true; |
| 1248 layer_tree_host()->SetDebugState(debug_state); | 1248 layer_tree_host()->SetDebugState(debug_state); |
| 1249 | 1249 |
| 1250 scoped_refptr<PaintedScrollbarLayer> scrollbar = | 1250 scoped_refptr<PaintedScrollbarLayer> scrollbar = |
| 1251 PaintedScrollbarLayer::Create( | 1251 PaintedScrollbarLayer::Create( |
| 1252 scoped_ptr<Scrollbar>(new FakeScrollbar).Pass(), content->id()); | 1252 scoped_ptr<Scrollbar>(new FakeScrollbar).Pass(), content.get()); |
| 1253 scrollbar->SetBounds(gfx::Size(10, 10)); | 1253 scrollbar->SetBounds(gfx::Size(10, 10)); |
| 1254 scrollbar->SetAnchorPoint(gfx::PointF()); | 1254 scrollbar->SetAnchorPoint(gfx::PointF()); |
| 1255 scrollbar->SetIsDrawable(true); | 1255 scrollbar->SetIsDrawable(true); |
| 1256 root->AddChild(scrollbar); | 1256 root->AddChild(scrollbar); |
| 1257 | 1257 |
| 1258 layer_tree_host()->SetRootLayer(root); | 1258 layer_tree_host()->SetRootLayer(root); |
| 1259 LayerTreeHostContextTest::SetupTree(); | 1259 LayerTreeHostContextTest::SetupTree(); |
| 1260 } | 1260 } |
| 1261 | 1261 |
| 1262 virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } | 1262 virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1675 | 1675 |
| 1676 MULTI_THREAD_TEST_F(LayerTreeHostContextTestImplSidePainting); | 1676 MULTI_THREAD_TEST_F(LayerTreeHostContextTestImplSidePainting); |
| 1677 | 1677 |
| 1678 class ScrollbarLayerLostContext : public LayerTreeHostContextTest { | 1678 class ScrollbarLayerLostContext : public LayerTreeHostContextTest { |
| 1679 public: | 1679 public: |
| 1680 ScrollbarLayerLostContext() : commits_(0) {} | 1680 ScrollbarLayerLostContext() : commits_(0) {} |
| 1681 | 1681 |
| 1682 virtual void BeginTest() OVERRIDE { | 1682 virtual void BeginTest() OVERRIDE { |
| 1683 scoped_refptr<Layer> scroll_layer = Layer::Create(); | 1683 scoped_refptr<Layer> scroll_layer = Layer::Create(); |
| 1684 scrollbar_layer_ = FakePaintedScrollbarLayer::Create( | 1684 scrollbar_layer_ = FakePaintedScrollbarLayer::Create( |
| 1685 false, true, scroll_layer->id()); | 1685 false, true, scroll_layer.get()); // WJM |
|
enne (OOO)
2013/11/19 19:30:22
?
wjmaclean
2013/12/24 21:03:49
Ooops! Removed spurious comment.
| |
| 1686 scrollbar_layer_->SetBounds(gfx::Size(10, 100)); | 1686 scrollbar_layer_->SetBounds(gfx::Size(10, 100)); |
| 1687 layer_tree_host()->root_layer()->AddChild(scrollbar_layer_); | 1687 layer_tree_host()->root_layer()->AddChild(scrollbar_layer_); |
| 1688 layer_tree_host()->root_layer()->AddChild(scroll_layer); | 1688 layer_tree_host()->root_layer()->AddChild(scroll_layer); |
| 1689 PostSetNeedsCommitToMainThread(); | 1689 PostSetNeedsCommitToMainThread(); |
| 1690 } | 1690 } |
| 1691 | 1691 |
| 1692 virtual void AfterTest() OVERRIDE {} | 1692 virtual void AfterTest() OVERRIDE {} |
| 1693 | 1693 |
| 1694 virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { | 1694 virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { |
| 1695 LayerTreeHostContextTest::CommitCompleteOnThread(impl); | 1695 LayerTreeHostContextTest::CommitCompleteOnThread(impl); |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2290 protected: | 2290 protected: |
| 2291 FakeContentLayerClient client_; | 2291 FakeContentLayerClient client_; |
| 2292 scoped_refptr<FakeContentLayer> layer_; | 2292 scoped_refptr<FakeContentLayer> layer_; |
| 2293 int num_commits_; | 2293 int num_commits_; |
| 2294 }; | 2294 }; |
| 2295 | 2295 |
| 2296 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestSurfaceCreateCallback); | 2296 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestSurfaceCreateCallback); |
| 2297 | 2297 |
| 2298 } // namespace | 2298 } // namespace |
| 2299 } // namespace cc | 2299 } // namespace cc |
| OLD | NEW |