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/eviction_tile_priority_queue.h" | 5 #include "cc/resources/eviction_tile_priority_queue.h" |
6 #include "cc/resources/raster_tile_priority_queue.h" | 6 #include "cc/resources/raster_tile_priority_queue.h" |
7 #include "cc/resources/tile.h" | 7 #include "cc/resources/tile.h" |
8 #include "cc/resources/tile_priority.h" | 8 #include "cc/resources/tile_priority.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_impl.h" | 10 #include "cc/test/fake_layer_tree_host_impl.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 void Initialize(int max_tiles, | 35 void Initialize(int max_tiles, |
36 TileMemoryLimitPolicy memory_limit_policy, | 36 TileMemoryLimitPolicy memory_limit_policy, |
37 TreePriority tree_priority) { | 37 TreePriority tree_priority) { |
38 output_surface_ = FakeOutputSurface::Create3d(); | 38 output_surface_ = FakeOutputSurface::Create3d(); |
39 CHECK(output_surface_->BindToClient(&output_surface_client_)); | 39 CHECK(output_surface_->BindToClient(&output_surface_client_)); |
40 | 40 |
41 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); | 41 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); |
42 resource_provider_ = ResourceProvider::Create(output_surface_.get(), | 42 resource_provider_ = ResourceProvider::Create(output_surface_.get(), |
43 shared_bitmap_manager_.get(), | 43 shared_bitmap_manager_.get(), |
44 NULL, | 44 NULL, |
| 45 NULL, |
45 0, | 46 0, |
46 false, | 47 false, |
47 1, | 48 1, |
48 false); | 49 false); |
49 resource_pool_ = ResourcePool::Create( | 50 resource_pool_ = ResourcePool::Create( |
50 resource_provider_.get(), GL_TEXTURE_2D, RGBA_8888); | 51 resource_provider_.get(), GL_TEXTURE_2D, RGBA_8888); |
51 tile_manager_ = | 52 tile_manager_ = |
52 make_scoped_ptr(new FakeTileManager(this, resource_pool_.get())); | 53 make_scoped_ptr(new FakeTileManager(this, resource_pool_.get())); |
53 | 54 |
54 memory_limit_policy_ = memory_limit_policy; | 55 memory_limit_policy_ = memory_limit_policy; |
(...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1135 all_tiles.insert(queue.Top()); | 1136 all_tiles.insert(queue.Top()); |
1136 ++tile_count; | 1137 ++tile_count; |
1137 queue.Pop(); | 1138 queue.Pop(); |
1138 } | 1139 } |
1139 EXPECT_EQ(tile_count, all_tiles.size()); | 1140 EXPECT_EQ(tile_count, all_tiles.size()); |
1140 EXPECT_EQ(17u, tile_count); | 1141 EXPECT_EQ(17u, tile_count); |
1141 } | 1142 } |
1142 | 1143 |
1143 } // namespace | 1144 } // namespace |
1144 } // namespace cc | 1145 } // namespace cc |
OLD | NEW |