Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1574)

Unified Diff: cc/test/fake_tile_manager.cc

Issue 18581004: cc: Remove tile ref counting in tile manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ut compile fix Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/fake_tile_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_tile_manager.cc
diff --git a/cc/test/fake_tile_manager.cc b/cc/test/fake_tile_manager.cc
index 7afda91f7b9fdc0f0daad9abe5eea86b3a7da4bb..eb4ab1f461af65daf4ecae3d671fa31bbbe7b03a 100644
--- a/cc/test/fake_tile_manager.cc
+++ b/cc/test/fake_tile_manager.cc
@@ -38,14 +38,27 @@ FakeTileManager::FakeTileManager(TileManagerClient* client,
NULL,
resource_provider->best_texture_format()) {}
+FakeTileManager::~FakeTileManager() {}
+
void FakeTileManager::ReassignMemoryToOOMTilesRequiredForActivation() {
- ReassignGpuMemoryToOOMTilesRequiredForActivation();
+ ReassignGpuMemoryToOOMTilesRequiredForActivation(
+ all_tiles, &tiles_for_raster, &oom_tiles_required_for_activation);
+}
+
+void FakeTileManager::AssignMemoryToTiles() {
+ tiles_for_raster.clear();
+ oom_tiles_required_for_activation.clear();
+ all_tiles.clear();
+
+ GetSortedTiles(&all_tiles);
+ AssignGpuMemoryToTiles(
+ all_tiles, &tiles_for_raster, &oom_tiles_required_for_activation);
}
bool FakeTileManager::HasBeenAssignedMemory(Tile* tile) {
- return std::find(tiles_that_need_to_be_rasterized().begin(),
- tiles_that_need_to_be_rasterized().end(),
- tile) != tiles_that_need_to_be_rasterized().end();
+ return std::find(tiles_for_raster.begin(),
+ tiles_for_raster.end(),
+ tile) != tiles_for_raster.end();
}
} // namespace cc
« no previous file with comments | « cc/test/fake_tile_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698