Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(565)

Side by Side Diff: cc/trees/layer_tree_host_unittest_context.cc

Issue 146713002: Revert of Pinch/Zoom Infrastructure & Plumbing CL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 root->AddChild(io_surface); 1083 root->AddChild(io_surface);
1084 } 1084 }
1085 1085
1086 // Enable the hud. 1086 // Enable the hud.
1087 LayerTreeDebugState debug_state; 1087 LayerTreeDebugState debug_state;
1088 debug_state.show_property_changed_rects = true; 1088 debug_state.show_property_changed_rects = true;
1089 layer_tree_host()->SetDebugState(debug_state); 1089 layer_tree_host()->SetDebugState(debug_state);
1090 1090
1091 scoped_refptr<PaintedScrollbarLayer> scrollbar = 1091 scoped_refptr<PaintedScrollbarLayer> scrollbar =
1092 PaintedScrollbarLayer::Create( 1092 PaintedScrollbarLayer::Create(
1093 scoped_ptr<Scrollbar>(new FakeScrollbar).Pass(), content.get()); 1093 scoped_ptr<Scrollbar>(new FakeScrollbar).Pass(), content->id());
1094 scrollbar->SetBounds(gfx::Size(10, 10)); 1094 scrollbar->SetBounds(gfx::Size(10, 10));
1095 scrollbar->SetAnchorPoint(gfx::PointF()); 1095 scrollbar->SetAnchorPoint(gfx::PointF());
1096 scrollbar->SetIsDrawable(true); 1096 scrollbar->SetIsDrawable(true);
1097 root->AddChild(scrollbar); 1097 root->AddChild(scrollbar);
1098 1098
1099 layer_tree_host()->SetRootLayer(root); 1099 layer_tree_host()->SetRootLayer(root);
1100 LayerTreeHostContextTest::SetupTree(); 1100 LayerTreeHostContextTest::SetupTree();
1101 } 1101 }
1102 1102
1103 virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } 1103 virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); }
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
1448 }; 1448 };
1449 1449
1450 MULTI_THREAD_TEST_F(LayerTreeHostContextTestImplSidePainting); 1450 MULTI_THREAD_TEST_F(LayerTreeHostContextTestImplSidePainting);
1451 1451
1452 class ScrollbarLayerLostContext : public LayerTreeHostContextTest { 1452 class ScrollbarLayerLostContext : public LayerTreeHostContextTest {
1453 public: 1453 public:
1454 ScrollbarLayerLostContext() : commits_(0) {} 1454 ScrollbarLayerLostContext() : commits_(0) {}
1455 1455
1456 virtual void BeginTest() OVERRIDE { 1456 virtual void BeginTest() OVERRIDE {
1457 scoped_refptr<Layer> scroll_layer = Layer::Create(); 1457 scoped_refptr<Layer> scroll_layer = Layer::Create();
1458 scrollbar_layer_ = FakePaintedScrollbarLayer::Create( 1458 scrollbar_layer_ =
1459 false, true, scroll_layer.get()); 1459 FakePaintedScrollbarLayer::Create(false, true, scroll_layer->id());
1460 scrollbar_layer_->SetBounds(gfx::Size(10, 100)); 1460 scrollbar_layer_->SetBounds(gfx::Size(10, 100));
1461 layer_tree_host()->root_layer()->AddChild(scrollbar_layer_); 1461 layer_tree_host()->root_layer()->AddChild(scrollbar_layer_);
1462 layer_tree_host()->root_layer()->AddChild(scroll_layer); 1462 layer_tree_host()->root_layer()->AddChild(scroll_layer);
1463 PostSetNeedsCommitToMainThread(); 1463 PostSetNeedsCommitToMainThread();
1464 } 1464 }
1465 1465
1466 virtual void AfterTest() OVERRIDE {} 1466 virtual void AfterTest() OVERRIDE {}
1467 1467
1468 virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE { 1468 virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE {
1469 LayerTreeHostContextTest::CommitCompleteOnThread(impl); 1469 LayerTreeHostContextTest::CommitCompleteOnThread(impl);
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1982 protected: 1982 protected:
1983 FakeContentLayerClient client_; 1983 FakeContentLayerClient client_;
1984 scoped_refptr<FakeContentLayer> layer_; 1984 scoped_refptr<FakeContentLayer> layer_;
1985 int num_commits_; 1985 int num_commits_;
1986 }; 1986 };
1987 1987
1988 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestSurfaceCreateCallback); 1988 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestSurfaceCreateCallback);
1989 1989
1990 } // namespace 1990 } // namespace
1991 } // namespace cc 1991 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_animation.cc ('k') | cc/trees/layer_tree_host_unittest_damage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698