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/thread_task_runner_handle.h" | 7 #include "base/thread_task_runner_handle.h" |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "cc/debug/lap_timer.h" | 9 #include "cc/debug/lap_timer.h" |
10 #include "cc/layers/layer_iterator.h" | 10 #include "cc/layers/layer_iterator.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), | 35 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), |
36 kTimeCheckInterval), | 36 kTimeCheckInterval), |
37 proxy_(base::ThreadTaskRunnerHandle::Get(), nullptr), | 37 proxy_(base::ThreadTaskRunnerHandle::Get(), nullptr), |
38 impl_(&proxy_), | 38 impl_(&proxy_), |
39 output_surface_(FakeOutputSurface::Create3d()) {} | 39 output_surface_(FakeOutputSurface::Create3d()) {} |
40 void CreateHost() { | 40 void CreateHost() { |
41 LayerTreeSettings settings; | 41 LayerTreeSettings settings; |
42 host_impl_ = LayerTreeHostImpl::Create(settings, &client_, &proxy_, &stats_, | 42 host_impl_ = LayerTreeHostImpl::Create(settings, &client_, &proxy_, &stats_, |
43 &shared_bitmap_manager_, nullptr, | 43 &shared_bitmap_manager_, nullptr, |
44 &task_graph_runner_, 1); | 44 &task_graph_runner_, 1); |
| 45 host_impl_->SetVisible(true); |
45 host_impl_->InitializeRenderer(output_surface_.get()); | 46 host_impl_->InitializeRenderer(output_surface_.get()); |
46 | 47 |
47 scoped_ptr<LayerImpl> root_layer = LayerImpl::Create(active_tree(), 1); | 48 scoped_ptr<LayerImpl> root_layer = LayerImpl::Create(active_tree(), 1); |
48 root_layer->SetHasRenderSurface(true); | 49 root_layer->SetHasRenderSurface(true); |
49 active_tree()->SetRootLayer(root_layer.Pass()); | 50 active_tree()->SetRootLayer(root_layer.Pass()); |
50 } | 51 } |
51 | 52 |
52 LayerTreeImpl* active_tree() { return host_impl_->active_tree(); } | 53 LayerTreeImpl* active_tree() { return host_impl_->active_tree(); } |
53 | 54 |
54 void SetTestName(const std::string& name) { test_name_ = name; } | 55 void SetTestName(const std::string& name) { test_name_ = name; } |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 EXPECT_EQ(active_tree()->root_layer(), next.current_layer); | 207 EXPECT_EQ(active_tree()->root_layer(), next.current_layer); |
207 | 208 |
208 ++begin; | 209 ++begin; |
209 EXPECT_EQ(end, begin); | 210 EXPECT_EQ(end, begin); |
210 | 211 |
211 PrintResults(); | 212 PrintResults(); |
212 } | 213 } |
213 | 214 |
214 } // namespace | 215 } // namespace |
215 } // namespace cc | 216 } // namespace cc |
OLD | NEW |