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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 private: | 56 private: |
57 RasterTask::Vector completed_tasks_; | 57 RasterTask::Vector completed_tasks_; |
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 base::MessageLoopProxy::current(), | |
67 NULL, | 66 NULL, |
68 g_fake_rasterizer.Pointer(), | 67 g_fake_rasterizer.Pointer(), |
| 68 true, |
69 NULL) {} | 69 NULL) {} |
70 | 70 |
71 FakeTileManager::FakeTileManager(TileManagerClient* client, | 71 FakeTileManager::FakeTileManager(TileManagerClient* client, |
72 ResourcePool* resource_pool) | 72 ResourcePool* resource_pool) |
73 : TileManager(client, | 73 : TileManager(client, |
74 base::MessageLoopProxy::current(), | |
75 resource_pool, | 74 resource_pool, |
76 g_fake_rasterizer.Pointer(), | 75 g_fake_rasterizer.Pointer(), |
| 76 true, |
| 77 NULL) {} |
| 78 |
| 79 FakeTileManager::FakeTileManager(TileManagerClient* client, |
| 80 ResourcePool* resource_pool, |
| 81 bool allow_on_demand_raster) |
| 82 : TileManager(client, |
| 83 resource_pool, |
| 84 g_fake_rasterizer.Pointer(), |
| 85 allow_on_demand_raster, |
77 NULL) {} | 86 NULL) {} |
78 | 87 |
79 FakeTileManager::~FakeTileManager() {} | 88 FakeTileManager::~FakeTileManager() {} |
80 | 89 |
81 void FakeTileManager::AssignMemoryToTiles( | 90 void FakeTileManager::AssignMemoryToTiles( |
82 const GlobalStateThatImpactsTilePriority& state) { | 91 const GlobalStateThatImpactsTilePriority& state) { |
83 tiles_for_raster.clear(); | 92 tiles_for_raster.clear(); |
84 all_tiles.Clear(); | 93 all_tiles.Clear(); |
85 | 94 |
86 SetGlobalStateForTesting(state); | 95 SetGlobalStateForTesting(state); |
(...skipping 10 matching lines...) Expand all Loading... |
97 void FakeTileManager::DidFinishRunningTasksForTesting() { | 106 void FakeTileManager::DidFinishRunningTasksForTesting() { |
98 DidFinishRunningTasks(); | 107 DidFinishRunningTasks(); |
99 } | 108 } |
100 | 109 |
101 void FakeTileManager::Release(Tile* tile) { | 110 void FakeTileManager::Release(Tile* tile) { |
102 TileManager::Release(tile); | 111 TileManager::Release(tile); |
103 CleanUpReleasedTiles(); | 112 CleanUpReleasedTiles(); |
104 } | 113 } |
105 | 114 |
106 } // namespace cc | 115 } // namespace cc |
OLD | NEW |