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/layers/picture_layer_impl.h" | 5 #include "cc/layers/picture_layer_impl.h" |
6 | 6 |
7 #include "cc/debug/lap_timer.h" | 7 #include "cc/debug/lap_timer.h" |
8 #include "cc/test/fake_impl_proxy.h" | 8 #include "cc/test/fake_impl_proxy.h" |
9 #include "cc/test/fake_layer_tree_host_impl.h" | 9 #include "cc/test/fake_layer_tree_host_impl.h" |
10 #include "cc/test/fake_output_surface.h" | 10 #include "cc/test/fake_output_surface.h" |
(...skipping 27 matching lines...) Loading... |
38 public: | 38 public: |
39 PictureLayerImplPerfTest() | 39 PictureLayerImplPerfTest() |
40 : proxy_(base::MessageLoopProxy::current()), | 40 : proxy_(base::MessageLoopProxy::current()), |
41 host_impl_(ImplSidePaintingSettings(), | 41 host_impl_(ImplSidePaintingSettings(), |
42 &proxy_, | 42 &proxy_, |
43 &shared_bitmap_manager_), | 43 &shared_bitmap_manager_), |
44 timer_(kWarmupRuns, | 44 timer_(kWarmupRuns, |
45 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), | 45 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), |
46 kTimeCheckInterval) {} | 46 kTimeCheckInterval) {} |
47 | 47 |
48 virtual void SetUp() override { | 48 void SetUp() override { |
49 host_impl_.InitializeRenderer(FakeOutputSurface::Create3d()); | 49 host_impl_.InitializeRenderer(FakeOutputSurface::Create3d()); |
50 } | 50 } |
51 | 51 |
52 void SetupPendingTree(const gfx::Size& layer_bounds, | 52 void SetupPendingTree(const gfx::Size& layer_bounds, |
53 const gfx::Size& tile_size) { | 53 const gfx::Size& tile_size) { |
54 scoped_refptr<FakePicturePileImpl> pile = | 54 scoped_refptr<FakePicturePileImpl> pile = |
55 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); | 55 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); |
56 host_impl_.CreatePendingTree(); | 56 host_impl_.CreatePendingTree(); |
57 LayerTreeImpl* pending_tree = host_impl_.pending_tree(); | 57 LayerTreeImpl* pending_tree = host_impl_.pending_tree(); |
58 pending_tree->DetachLayerTree(); | 58 pending_tree->DetachLayerTree(); |
(...skipping 208 matching lines...) Loading... |
267 | 267 |
268 RunEvictionIteratorConstructTest("0_0_100x100", gfx::Rect(0, 0, 100, 100)); | 268 RunEvictionIteratorConstructTest("0_0_100x100", gfx::Rect(0, 0, 100, 100)); |
269 RunEvictionIteratorConstructTest("5000_0_100x100", | 269 RunEvictionIteratorConstructTest("5000_0_100x100", |
270 gfx::Rect(5000, 0, 100, 100)); | 270 gfx::Rect(5000, 0, 100, 100)); |
271 RunEvictionIteratorConstructTest("9999_0_100x100", | 271 RunEvictionIteratorConstructTest("9999_0_100x100", |
272 gfx::Rect(9999, 0, 100, 100)); | 272 gfx::Rect(9999, 0, 100, 100)); |
273 } | 273 } |
274 | 274 |
275 } // namespace | 275 } // namespace |
276 } // namespace cc | 276 } // namespace cc |
OLD | NEW |