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

Unified Diff: cc/test/fake_tile_manager.cc

Issue 19308003: Merge 210713 "cc: Remove tile ref counting in tile manager." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1547/src/
Patch Set: 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
===================================================================
--- cc/test/fake_tile_manager.cc (revision 211727)
+++ cc/test/fake_tile_manager.cc (working copy)
@@ -40,14 +40,27 @@
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