OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/occlusion_tracker.h" | 5 #include "cc/trees/occlusion_tracker.h" |
6 | 6 |
7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
8 #include "cc/debug/lap_timer.h" | 8 #include "cc/debug/lap_timer.h" |
9 #include "cc/layers/layer_iterator.h" | 9 #include "cc/layers/layer_iterator.h" |
10 #include "cc/layers/solid_color_layer_impl.h" | 10 #include "cc/layers/solid_color_layer_impl.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 class OcclusionTrackerPerfTest : public testing::Test { | 29 class OcclusionTrackerPerfTest : public testing::Test { |
30 public: | 30 public: |
31 OcclusionTrackerPerfTest() | 31 OcclusionTrackerPerfTest() |
32 : timer_(kWarmupRuns, | 32 : timer_(kWarmupRuns, |
33 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), | 33 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), |
34 kTimeCheckInterval), | 34 kTimeCheckInterval), |
35 impl_(&proxy_) {} | 35 impl_(&proxy_) {} |
36 void CreateHost() { | 36 void CreateHost() { |
37 LayerTreeSettings settings; | 37 LayerTreeSettings settings; |
38 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); | 38 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); |
39 host_impl_ = LayerTreeHostImpl::Create( | 39 host_impl_ = LayerTreeHostImpl::Create(settings, |
40 settings, &client_, &proxy_, &stats_, shared_bitmap_manager_.get(), 1); | 40 &client_, |
| 41 &proxy_, |
| 42 &stats_, |
| 43 shared_bitmap_manager_.get(), |
| 44 NULL, |
| 45 1); |
41 host_impl_->InitializeRenderer(FakeOutputSurface::Create3d()); | 46 host_impl_->InitializeRenderer(FakeOutputSurface::Create3d()); |
42 | 47 |
43 scoped_ptr<LayerImpl> root_layer = LayerImpl::Create(active_tree(), 1); | 48 scoped_ptr<LayerImpl> root_layer = LayerImpl::Create(active_tree(), 1); |
44 active_tree()->SetRootLayer(root_layer.Pass()); | 49 active_tree()->SetRootLayer(root_layer.Pass()); |
45 } | 50 } |
46 | 51 |
47 LayerTreeImpl* active_tree() { return host_impl_->active_tree(); } | 52 LayerTreeImpl* active_tree() { return host_impl_->active_tree(); } |
48 | 53 |
49 void SetTestName(const std::string& name) { test_name_ = name; } | 54 void SetTestName(const std::string& name) { test_name_ = name; } |
50 | 55 |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 EXPECT_EQ(active_tree()->root_layer(), next.current_layer); | 205 EXPECT_EQ(active_tree()->root_layer(), next.current_layer); |
201 | 206 |
202 ++begin; | 207 ++begin; |
203 EXPECT_EQ(end, begin); | 208 EXPECT_EQ(end, begin); |
204 | 209 |
205 PrintResults(); | 210 PrintResults(); |
206 } | 211 } |
207 | 212 |
208 } // namespace | 213 } // namespace |
209 } // namespace cc | 214 } // namespace cc |
OLD | NEW |