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