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(settings, | 39 host_impl_ = |
40 &client_, | 40 LayerTreeHostImpl::Create(settings, &client_, &proxy_, &stats_, |
41 &proxy_, | 41 shared_bitmap_manager_.get(), NULL, NULL, 1); |
42 &stats_, | |
43 shared_bitmap_manager_.get(), | |
44 NULL, | |
45 1); | |
46 host_impl_->InitializeRenderer(FakeOutputSurface::Create3d()); | 42 host_impl_->InitializeRenderer(FakeOutputSurface::Create3d()); |
47 | 43 |
48 scoped_ptr<LayerImpl> root_layer = LayerImpl::Create(active_tree(), 1); | 44 scoped_ptr<LayerImpl> root_layer = LayerImpl::Create(active_tree(), 1); |
49 root_layer->SetHasRenderSurface(true); | 45 root_layer->SetHasRenderSurface(true); |
50 active_tree()->SetRootLayer(root_layer.Pass()); | 46 active_tree()->SetRootLayer(root_layer.Pass()); |
51 } | 47 } |
52 | 48 |
53 LayerTreeImpl* active_tree() { return host_impl_->active_tree(); } | 49 LayerTreeImpl* active_tree() { return host_impl_->active_tree(); } |
54 | 50 |
55 void SetTestName(const std::string& name) { test_name_ = name; } | 51 void SetTestName(const std::string& name) { test_name_ = name; } |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 EXPECT_EQ(active_tree()->root_layer(), next.current_layer); | 204 EXPECT_EQ(active_tree()->root_layer(), next.current_layer); |
209 | 205 |
210 ++begin; | 206 ++begin; |
211 EXPECT_EQ(end, begin); | 207 EXPECT_EQ(end, begin); |
212 | 208 |
213 PrintResults(); | 209 PrintResults(); |
214 } | 210 } |
215 | 211 |
216 } // namespace | 212 } // namespace |
217 } // namespace cc | 213 } // namespace cc |
OLD | NEW |