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 "base/time/time.h" | 5 #include "base/time/time.h" |
6 #include "cc/resources/tile.h" | 6 #include "cc/resources/tile.h" |
7 #include "cc/resources/tile_priority.h" | 7 #include "cc/resources/tile_priority.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 29 matching lines...) Expand all Loading... |
40 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), | 40 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), |
41 kTimeCheckInterval) {} | 41 kTimeCheckInterval) {} |
42 | 42 |
43 // Overridden from testing::Test: | 43 // Overridden from testing::Test: |
44 virtual void SetUp() OVERRIDE { | 44 virtual void SetUp() OVERRIDE { |
45 output_surface_ = FakeOutputSurface::Create3d(); | 45 output_surface_ = FakeOutputSurface::Create3d(); |
46 CHECK(output_surface_->BindToClient(&output_surface_client_)); | 46 CHECK(output_surface_->BindToClient(&output_surface_client_)); |
47 | 47 |
48 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); | 48 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); |
49 resource_provider_ = ResourceProvider::Create( | 49 resource_provider_ = ResourceProvider::Create( |
50 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1); | 50 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1, |
| 51 false); |
51 resource_pool_ = ResourcePool::Create( | 52 resource_pool_ = ResourcePool::Create( |
52 resource_provider_.get(), GL_TEXTURE_2D, RGBA_8888); | 53 resource_provider_.get(), GL_TEXTURE_2D, RGBA_8888); |
53 size_t raster_task_limit_bytes = 32 * 1024 * 1024; // 16-64MB in practice. | 54 size_t raster_task_limit_bytes = 32 * 1024 * 1024; // 16-64MB in practice. |
54 tile_manager_ = make_scoped_ptr(new FakeTileManager( | 55 tile_manager_ = make_scoped_ptr(new FakeTileManager( |
55 &tile_manager_client_, resource_pool_.get(), raster_task_limit_bytes)); | 56 &tile_manager_client_, resource_pool_.get(), raster_task_limit_bytes)); |
56 picture_pile_ = FakePicturePileImpl::CreateInfiniteFilledPile(); | 57 picture_pile_ = FakePicturePileImpl::CreateInfiniteFilledPile(); |
57 } | 58 } |
58 | 59 |
59 GlobalStateThatImpactsTilePriority GlobalStateForTest() { | 60 GlobalStateThatImpactsTilePriority GlobalStateForTest() { |
60 GlobalStateThatImpactsTilePriority state; | 61 GlobalStateThatImpactsTilePriority state; |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 | 349 |
349 RunTest("2_16", 16); | 350 RunTest("2_16", 16); |
350 RunTest("2_32", 32); | 351 RunTest("2_32", 32); |
351 RunTest("2_64", 64); | 352 RunTest("2_64", 64); |
352 RunTest("2_128", 128); | 353 RunTest("2_128", 128); |
353 } | 354 } |
354 | 355 |
355 } // namespace | 356 } // namespace |
356 | 357 |
357 } // namespace cc | 358 } // namespace cc |
OLD | NEW |