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 "cc/debug/lap_timer.h" | 7 #include "cc/debug/lap_timer.h" |
8 #include "cc/resources/layer_painter.h" | 8 #include "cc/resources/layer_painter.h" |
9 #include "cc/test/fake_impl_proxy.h" | 9 #include "cc/test/fake_impl_proxy.h" |
10 #include "cc/test/fake_layer_tree_host.h" | 10 #include "cc/test/fake_layer_tree_host.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 LayerPerfTest() | 34 LayerPerfTest() |
35 : host_impl_(&proxy_, &shared_bitmap_manager_), | 35 : host_impl_(&proxy_, &shared_bitmap_manager_), |
36 fake_client_(FakeLayerTreeHostClient::DIRECT_3D), | 36 fake_client_(FakeLayerTreeHostClient::DIRECT_3D), |
37 timer_(kWarmupRuns, | 37 timer_(kWarmupRuns, |
38 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), | 38 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), |
39 kTimeCheckInterval) {} | 39 kTimeCheckInterval) {} |
40 | 40 |
41 protected: | 41 protected: |
42 virtual void SetUp() OVERRIDE { | 42 virtual void SetUp() OVERRIDE { |
43 layer_tree_host_ = FakeLayerTreeHost::Create(); | 43 layer_tree_host_ = FakeLayerTreeHost::Create(); |
44 layer_tree_host_->InitializeSingleThreaded(&fake_client_); | 44 layer_tree_host_->InitializeSingleThreaded( |
| 45 &fake_client_, base::MessageLoopProxy::current()); |
45 } | 46 } |
46 | 47 |
47 virtual void TearDown() OVERRIDE { | 48 virtual void TearDown() OVERRIDE { |
48 layer_tree_host_->SetRootLayer(NULL); | 49 layer_tree_host_->SetRootLayer(NULL); |
49 layer_tree_host_.reset(); | 50 layer_tree_host_.reset(); |
50 } | 51 } |
51 | 52 |
52 FakeImplProxy proxy_; | 53 FakeImplProxy proxy_; |
53 TestSharedBitmapManager shared_bitmap_manager_; | 54 TestSharedBitmapManager shared_bitmap_manager_; |
54 FakeLayerTreeHostImpl host_impl_; | 55 FakeLayerTreeHostImpl host_impl_; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 "", | 114 "", |
114 "props_didnt_change", | 115 "props_didnt_change", |
115 timer_.LapsPerSecond(), | 116 timer_.LapsPerSecond(), |
116 "runs/s", | 117 "runs/s", |
117 true); | 118 true); |
118 } | 119 } |
119 | 120 |
120 | 121 |
121 } // namespace | 122 } // namespace |
122 } // namespace cc | 123 } // namespace cc |
OLD | NEW |