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 28 matching lines...) Expand all Loading... |
39 host_impl_ = LayerTreeHostImpl::Create(settings, | 39 host_impl_ = LayerTreeHostImpl::Create(settings, |
40 &client_, | 40 &client_, |
41 &proxy_, | 41 &proxy_, |
42 &stats_, | 42 &stats_, |
43 shared_bitmap_manager_.get(), | 43 shared_bitmap_manager_.get(), |
44 NULL, | 44 NULL, |
45 1); | 45 1); |
46 host_impl_->InitializeRenderer(FakeOutputSurface::Create3d()); | 46 host_impl_->InitializeRenderer(FakeOutputSurface::Create3d()); |
47 | 47 |
48 scoped_ptr<LayerImpl> root_layer = LayerImpl::Create(active_tree(), 1); | 48 scoped_ptr<LayerImpl> root_layer = LayerImpl::Create(active_tree(), 1); |
| 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; } |
55 | 56 |
56 void PrintResults() { | 57 void PrintResults() { |
57 CHECK(!test_name_.empty()) << "Must SetTestName() before AfterTest()."; | 58 CHECK(!test_name_.empty()) << "Must SetTestName() before AfterTest()."; |
58 perf_test::PrintResult("occlusion_tracker_time", | 59 perf_test::PrintResult("occlusion_tracker_time", |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 EXPECT_EQ(active_tree()->root_layer(), next.current_layer); | 206 EXPECT_EQ(active_tree()->root_layer(), next.current_layer); |
206 | 207 |
207 ++begin; | 208 ++begin; |
208 EXPECT_EQ(end, begin); | 209 EXPECT_EQ(end, begin); |
209 | 210 |
210 PrintResults(); | 211 PrintResults(); |
211 } | 212 } |
212 | 213 |
213 } // namespace | 214 } // namespace |
214 } // namespace cc | 215 } // namespace cc |
OLD | NEW |