| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/test/fake_tile_manager.h" | 5 #include "cc/test/fake_tile_manager.h" |
| 6 | 6 |
| 7 #include <deque> | 7 #include <deque> |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "cc/resources/rasterizer.h" | 10 #include "cc/resources/rasterizer.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 }; | 58 }; |
| 59 base::LazyInstance<FakeRasterizerImpl> g_fake_rasterizer = | 59 base::LazyInstance<FakeRasterizerImpl> g_fake_rasterizer = |
| 60 LAZY_INSTANCE_INITIALIZER; | 60 LAZY_INSTANCE_INITIALIZER; |
| 61 | 61 |
| 62 } // namespace | 62 } // namespace |
| 63 | 63 |
| 64 FakeTileManager::FakeTileManager(TileManagerClient* client) | 64 FakeTileManager::FakeTileManager(TileManagerClient* client) |
| 65 : TileManager(client, | 65 : TileManager(client, |
| 66 NULL, | 66 NULL, |
| 67 g_fake_rasterizer.Pointer(), | 67 g_fake_rasterizer.Pointer(), |
| 68 g_fake_rasterizer.Pointer(), | |
| 69 true, | 68 true, |
| 70 NULL) {} | 69 NULL) {} |
| 71 | 70 |
| 72 FakeTileManager::FakeTileManager(TileManagerClient* client, | 71 FakeTileManager::FakeTileManager(TileManagerClient* client, |
| 73 ResourcePool* resource_pool) | 72 ResourcePool* resource_pool) |
| 74 : TileManager(client, | 73 : TileManager(client, |
| 75 resource_pool, | 74 resource_pool, |
| 76 g_fake_rasterizer.Pointer(), | 75 g_fake_rasterizer.Pointer(), |
| 77 g_fake_rasterizer.Pointer(), | |
| 78 true, | 76 true, |
| 79 NULL) {} | 77 NULL) {} |
| 80 | 78 |
| 81 FakeTileManager::FakeTileManager(TileManagerClient* client, | 79 FakeTileManager::FakeTileManager(TileManagerClient* client, |
| 82 ResourcePool* resource_pool, | 80 ResourcePool* resource_pool, |
| 83 bool allow_on_demand_raster) | 81 bool allow_on_demand_raster) |
| 84 : TileManager(client, | 82 : TileManager(client, |
| 85 resource_pool, | 83 resource_pool, |
| 86 g_fake_rasterizer.Pointer(), | 84 g_fake_rasterizer.Pointer(), |
| 87 g_fake_rasterizer.Pointer(), | |
| 88 allow_on_demand_raster, | 85 allow_on_demand_raster, |
| 89 NULL) {} | 86 NULL) {} |
| 90 | 87 |
| 91 FakeTileManager::~FakeTileManager() {} | 88 FakeTileManager::~FakeTileManager() {} |
| 92 | 89 |
| 93 void FakeTileManager::AssignMemoryToTiles( | 90 void FakeTileManager::AssignMemoryToTiles( |
| 94 const GlobalStateThatImpactsTilePriority& state) { | 91 const GlobalStateThatImpactsTilePriority& state) { |
| 95 tiles_for_raster.clear(); | 92 tiles_for_raster.clear(); |
| 96 all_tiles.Clear(); | 93 all_tiles.Clear(); |
| 97 | 94 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 109 void FakeTileManager::DidFinishRunningTasksForTesting() { | 106 void FakeTileManager::DidFinishRunningTasksForTesting() { |
| 110 DidFinishRunningTasks(); | 107 DidFinishRunningTasks(); |
| 111 } | 108 } |
| 112 | 109 |
| 113 void FakeTileManager::Release(Tile* tile) { | 110 void FakeTileManager::Release(Tile* tile) { |
| 114 TileManager::Release(tile); | 111 TileManager::Release(tile); |
| 115 CleanUpReleasedTiles(); | 112 CleanUpReleasedTiles(); |
| 116 } | 113 } |
| 117 | 114 |
| 118 } // namespace cc | 115 } // namespace cc |
| OLD | NEW |