OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/layers/layer.h" | 5 #include "cc/layers/layer.h" |
6 | 6 |
7 #include "base/thread_task_runner_handle.h" | 7 #include "base/thread_task_runner_handle.h" |
8 #include "cc/debug/lap_timer.h" | 8 #include "cc/debug/lap_timer.h" |
9 #include "cc/test/fake_impl_task_runner_provider.h" | 9 #include "cc/test/fake_impl_task_runner_provider.h" |
10 #include "cc/test/fake_layer_tree_host.h" | 10 #include "cc/test/fake_layer_tree_host.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 layer_tree_host_->SetRootLayer(nullptr); | 44 layer_tree_host_->SetRootLayer(nullptr); |
45 layer_tree_host_ = nullptr; | 45 layer_tree_host_ = nullptr; |
46 } | 46 } |
47 | 47 |
48 FakeImplTaskRunnerProvider task_runner_provider_; | 48 FakeImplTaskRunnerProvider task_runner_provider_; |
49 TestSharedBitmapManager shared_bitmap_manager_; | 49 TestSharedBitmapManager shared_bitmap_manager_; |
50 TestTaskGraphRunner task_graph_runner_; | 50 TestTaskGraphRunner task_graph_runner_; |
51 FakeLayerTreeHostImpl host_impl_; | 51 FakeLayerTreeHostImpl host_impl_; |
52 | 52 |
53 FakeLayerTreeHostClient fake_client_; | 53 FakeLayerTreeHostClient fake_client_; |
54 scoped_ptr<FakeLayerTreeHost> layer_tree_host_; | 54 std::unique_ptr<FakeLayerTreeHost> layer_tree_host_; |
55 LapTimer timer_; | 55 LapTimer timer_; |
56 }; | 56 }; |
57 | 57 |
58 TEST_F(LayerPerfTest, PushPropertiesTo) { | 58 TEST_F(LayerPerfTest, PushPropertiesTo) { |
59 scoped_refptr<Layer> test_layer = Layer::Create(); | 59 scoped_refptr<Layer> test_layer = Layer::Create(); |
60 scoped_ptr<LayerImpl> impl_layer = | 60 std::unique_ptr<LayerImpl> impl_layer = |
61 LayerImpl::Create(host_impl_.active_tree(), 1); | 61 LayerImpl::Create(host_impl_.active_tree(), 1); |
62 | 62 |
63 layer_tree_host_->SetRootLayer(test_layer); | 63 layer_tree_host_->SetRootLayer(test_layer); |
64 | 64 |
65 float transform_origin_z = 0; | 65 float transform_origin_z = 0; |
66 bool scrollable = true; | 66 bool scrollable = true; |
67 bool contents_opaque = true; | 67 bool contents_opaque = true; |
68 bool double_sided = true; | 68 bool double_sided = true; |
69 bool hide_layer_and_subtree = true; | 69 bool hide_layer_and_subtree = true; |
70 bool masks_to_bounds = true; | 70 bool masks_to_bounds = true; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 "", | 110 "", |
111 "props_didnt_change", | 111 "props_didnt_change", |
112 timer_.LapsPerSecond(), | 112 timer_.LapsPerSecond(), |
113 "runs/s", | 113 "runs/s", |
114 true); | 114 true); |
115 } | 115 } |
116 | 116 |
117 | 117 |
118 } // namespace | 118 } // namespace |
119 } // namespace cc | 119 } // namespace cc |
OLD | NEW |