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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/thread_task_runner_handle.h" | 9 #include "base/thread_task_runner_handle.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 output_surface_(FakeOutputSurface::Create3d()) {} | 40 output_surface_(FakeOutputSurface::Create3d()) {} |
41 void CreateHost() { | 41 void CreateHost() { |
42 LayerTreeSettings settings; | 42 LayerTreeSettings settings; |
43 host_impl_ = LayerTreeHostImpl::Create( | 43 host_impl_ = LayerTreeHostImpl::Create( |
44 settings, &client_, &impl_task_runner_provider_, &stats_, | 44 settings, &client_, &impl_task_runner_provider_, &stats_, |
45 &shared_bitmap_manager_, nullptr, &task_graph_runner_, 1); | 45 &shared_bitmap_manager_, nullptr, &task_graph_runner_, 1); |
46 host_impl_->SetVisible(true); | 46 host_impl_->SetVisible(true); |
47 host_impl_->InitializeRenderer(output_surface_.get()); | 47 host_impl_->InitializeRenderer(output_surface_.get()); |
48 | 48 |
49 std::unique_ptr<LayerImpl> root_layer = LayerImpl::Create(active_tree(), 1); | 49 std::unique_ptr<LayerImpl> root_layer = LayerImpl::Create(active_tree(), 1); |
50 root_layer->SetForceRenderSurface(true); | 50 root_layer->test_properties()->force_render_surface = true; |
51 active_tree()->SetRootLayer(std::move(root_layer)); | 51 active_tree()->SetRootLayer(std::move(root_layer)); |
52 } | 52 } |
53 | 53 |
54 LayerTreeImpl* active_tree() { return host_impl_->active_tree(); } | 54 LayerTreeImpl* active_tree() { return host_impl_->active_tree(); } |
55 | 55 |
56 void SetTestName(const std::string& name) { test_name_ = name; } | 56 void SetTestName(const std::string& name) { test_name_ = name; } |
57 | 57 |
58 void PrintResults() { | 58 void PrintResults() { |
59 CHECK(!test_name_.empty()) << "Must SetTestName() before AfterTest()."; | 59 CHECK(!test_name_.empty()) << "Must SetTestName() before AfterTest()."; |
60 perf_test::PrintResult("occlusion_tracker_time", | 60 perf_test::PrintResult("occlusion_tracker_time", |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 EXPECT_EQ(active_tree()->root_layer(), next.current_layer); | 209 EXPECT_EQ(active_tree()->root_layer(), next.current_layer); |
210 | 210 |
211 ++begin; | 211 ++begin; |
212 EXPECT_EQ(end, begin); | 212 EXPECT_EQ(end, begin); |
213 | 213 |
214 PrintResults(); | 214 PrintResults(); |
215 } | 215 } |
216 | 216 |
217 } // namespace | 217 } // namespace |
218 } // namespace cc | 218 } // namespace cc |
OLD | NEW |