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

Side by Side Diff: cc/layers/layer_iterator_unittest.cc

Issue 1411663002: cc: Split Proxy to eliminate unnecessary dependencies on the impl side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update perf tests. Created 5 years, 2 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
« no previous file with comments | « cc/layers/layer_impl_unittest.cc ('k') | cc/layers/layer_perftest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/layers/layer_iterator.h" 5 #include "cc/layers/layer_iterator.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "cc/layers/layer.h" 9 #include "cc/layers/layer.h"
10 #include "cc/test/fake_layer_tree_host.h" 10 #include "cc/test/fake_layer_tree_host.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 if (it.represents_contributing_render_surface()) 86 if (it.represents_contributing_render_surface())
87 layer->count_representing_contributing_surface_ = count; 87 layer->count_representing_contributing_surface_ = count;
88 if (it.represents_itself()) 88 if (it.represents_itself())
89 layer->count_representing_itself_ = count; 89 layer->count_representing_itself_ = count;
90 } 90 }
91 } 91 }
92 92
93 class LayerIteratorTest : public testing::Test { 93 class LayerIteratorTest : public testing::Test {
94 public: 94 public:
95 LayerIteratorTest() 95 LayerIteratorTest()
96 : host_impl_(&proxy_, &shared_bitmap_manager_, &task_graph_runner_), 96 : host_impl_(&task_runner_provider_,
97 &shared_bitmap_manager_,
98 &task_graph_runner_),
97 id_(1) {} 99 id_(1) {}
98 100
99 scoped_ptr<TestLayerImpl> CreateLayer() { 101 scoped_ptr<TestLayerImpl> CreateLayer() {
100 return TestLayerImpl::Create(host_impl_.active_tree(), id_++); 102 return TestLayerImpl::Create(host_impl_.active_tree(), id_++);
101 } 103 }
102 104
103 protected: 105 protected:
104 FakeImplProxy proxy_; 106 FakeImplTaskRunnerProvider task_runner_provider_;
105 TestSharedBitmapManager shared_bitmap_manager_; 107 TestSharedBitmapManager shared_bitmap_manager_;
106 TestTaskGraphRunner task_graph_runner_; 108 TestTaskGraphRunner task_graph_runner_;
107 FakeLayerTreeHostImpl host_impl_; 109 FakeLayerTreeHostImpl host_impl_;
108 110
109 int id_; 111 int id_;
110 }; 112 };
111 113
112 TEST_F(LayerIteratorTest, EmptyTree) { 114 TEST_F(LayerIteratorTest, EmptyTree) {
113 LayerImplList render_surface_layer_list; 115 LayerImplList render_surface_layer_list;
114 116
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 EXPECT_COUNT(root21_ptr, -1, -1, 9); 250 EXPECT_COUNT(root21_ptr, -1, -1, 9);
249 EXPECT_COUNT(root22_ptr, 7, 8, 6); 251 EXPECT_COUNT(root22_ptr, 7, 8, 6);
250 EXPECT_COUNT(root221_ptr, -1, -1, 5); 252 EXPECT_COUNT(root221_ptr, -1, -1, 5);
251 EXPECT_COUNT(root23_ptr, 3, 4, 2); 253 EXPECT_COUNT(root23_ptr, 3, 4, 2);
252 EXPECT_COUNT(root231_ptr, -1, -1, 1); 254 EXPECT_COUNT(root231_ptr, -1, -1, 1);
253 EXPECT_COUNT(root3_ptr, -1, -1, 0); 255 EXPECT_COUNT(root3_ptr, -1, -1, 0);
254 } 256 }
255 257
256 } // namespace 258 } // namespace
257 } // namespace cc 259 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl_unittest.cc ('k') | cc/layers/layer_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698