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