| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/animation/animation_host.h" | 5 #include "cc/animation/animation_host.h" |
| 6 | 6 |
| 7 #include "base/thread_task_runner_handle.h" | 7 #include "base/thread_task_runner_handle.h" |
| 8 #include "cc/animation/animation_id_provider.h" | 8 #include "cc/animation/animation_id_provider.h" |
| 9 #include "cc/animation/animation_player.h" | 9 #include "cc/animation/animation_player.h" |
| 10 #include "cc/animation/animation_timeline.h" | 10 #include "cc/animation/animation_timeline.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 do { | 107 do { |
| 108 host()->PushPropertiesTo(host_impl()); | 108 host()->PushPropertiesTo(host_impl()); |
| 109 timer_.NextLap(); | 109 timer_.NextLap(); |
| 110 } while (!timer_.HasTimeLimitExpired()); | 110 } while (!timer_.HasTimeLimitExpired()); |
| 111 | 111 |
| 112 perf_test::PrintResult("push_properties_to", "", "", timer_.LapsPerSecond(), | 112 perf_test::PrintResult("push_properties_to", "", "", timer_.LapsPerSecond(), |
| 113 "runs/s", true); | 113 "runs/s", true); |
| 114 } | 114 } |
| 115 | 115 |
| 116 protected: | 116 protected: |
| 117 scoped_ptr<FakeLayerTreeHost> layer_tree_host_; | 117 std::unique_ptr<FakeLayerTreeHost> layer_tree_host_; |
| 118 scoped_refptr<Layer> root_layer_; | 118 scoped_refptr<Layer> root_layer_; |
| 119 LayerImpl* root_layer_impl_; | 119 LayerImpl* root_layer_impl_; |
| 120 | 120 |
| 121 LapTimer timer_; | 121 LapTimer timer_; |
| 122 TestTaskGraphRunner task_graph_runner_; | 122 TestTaskGraphRunner task_graph_runner_; |
| 123 FakeLayerTreeHostClient fake_client_; | 123 FakeLayerTreeHostClient fake_client_; |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 TEST_F(AnimationHostPerfTest, Push1000PlayersPropertiesTo) { | 126 TEST_F(AnimationHostPerfTest, Push1000PlayersPropertiesTo) { |
| 127 CreatePlayers(1000); | 127 CreatePlayers(1000); |
| 128 DoTest(); | 128 DoTest(); |
| 129 } | 129 } |
| 130 | 130 |
| 131 TEST_F(AnimationHostPerfTest, Push10TimelinesPropertiesTo) { | 131 TEST_F(AnimationHostPerfTest, Push10TimelinesPropertiesTo) { |
| 132 CreateTimelines(10); | 132 CreateTimelines(10); |
| 133 DoTest(); | 133 DoTest(); |
| 134 } | 134 } |
| 135 | 135 |
| 136 TEST_F(AnimationHostPerfTest, Push1000TimelinesPropertiesTo) { | 136 TEST_F(AnimationHostPerfTest, Push1000TimelinesPropertiesTo) { |
| 137 CreateTimelines(1000); | 137 CreateTimelines(1000); |
| 138 DoTest(); | 138 DoTest(); |
| 139 } | 139 } |
| 140 | 140 |
| 141 } // namespace cc | 141 } // namespace cc |
| OLD | NEW |