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/resources/tile.h" | 5 #include "cc/resources/tile.h" |
6 #include "cc/resources/tile_priority.h" | 6 #include "cc/resources/tile_priority.h" |
7 #include "cc/test/fake_impl_proxy.h" | 7 #include "cc/test/fake_impl_proxy.h" |
8 #include "cc/test/fake_layer_tree_host_impl.h" | 8 #include "cc/test/fake_layer_tree_host_impl.h" |
9 #include "cc/test/fake_output_surface.h" | 9 #include "cc/test/fake_output_surface.h" |
10 #include "cc/test/fake_output_surface_client.h" | 10 #include "cc/test/fake_output_surface_client.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 void Initialize(int max_tiles, | 33 void Initialize(int max_tiles, |
34 TileMemoryLimitPolicy memory_limit_policy, | 34 TileMemoryLimitPolicy memory_limit_policy, |
35 TreePriority tree_priority, | 35 TreePriority tree_priority, |
36 bool allow_on_demand_raster = true) { | 36 bool allow_on_demand_raster = true) { |
37 output_surface_ = FakeOutputSurface::Create3d(); | 37 output_surface_ = FakeOutputSurface::Create3d(); |
38 CHECK(output_surface_->BindToClient(&output_surface_client_)); | 38 CHECK(output_surface_->BindToClient(&output_surface_client_)); |
39 | 39 |
40 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); | 40 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); |
41 resource_provider_ = ResourceProvider::Create( | 41 resource_provider_ = ResourceProvider::Create( |
42 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1); | 42 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1, |
| 43 false); |
43 resource_pool_ = ResourcePool::Create( | 44 resource_pool_ = ResourcePool::Create( |
44 resource_provider_.get(), GL_TEXTURE_2D, RGBA_8888); | 45 resource_provider_.get(), GL_TEXTURE_2D, RGBA_8888); |
45 tile_manager_ = make_scoped_ptr(new FakeTileManager( | 46 tile_manager_ = make_scoped_ptr(new FakeTileManager( |
46 this, resource_pool_.get(), allow_on_demand_raster)); | 47 this, resource_pool_.get(), allow_on_demand_raster)); |
47 | 48 |
48 memory_limit_policy_ = memory_limit_policy; | 49 memory_limit_policy_ = memory_limit_policy; |
49 max_tiles_ = max_tiles; | 50 max_tiles_ = max_tiles; |
50 picture_pile_ = FakePicturePileImpl::CreateInfiniteFilledPile(); | 51 picture_pile_ = FakePicturePileImpl::CreateInfiniteFilledPile(); |
51 | 52 |
52 SetTreePriority(tree_priority); | 53 SetTreePriority(tree_priority); |
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1132 | 1133 |
1133 last_tile = tile; | 1134 last_tile = tile; |
1134 new_content_tiles.insert(tile); | 1135 new_content_tiles.insert(tile); |
1135 } | 1136 } |
1136 | 1137 |
1137 EXPECT_EQ(tile_count, new_content_tiles.size()); | 1138 EXPECT_EQ(tile_count, new_content_tiles.size()); |
1138 EXPECT_EQ(all_tiles, new_content_tiles); | 1139 EXPECT_EQ(all_tiles, new_content_tiles); |
1139 } | 1140 } |
1140 } // namespace | 1141 } // namespace |
1141 } // namespace cc | 1142 } // namespace cc |
OLD | NEW |