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

Unified Diff: cc/test/fake_tile_manager.cc

Issue 62283012: cc: Added tile bundles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years 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 65230608744abff70c1107585fd2b2f92a844b11..907e0fadf130ce718f1638c8395f4b69cea3cdd6 100644
--- a/cc/test/fake_tile_manager.cc
+++ b/cc/test/fake_tile_manager.cc
@@ -55,7 +55,8 @@ FakeTileManager::FakeTileManager(TileManagerClient* client)
make_scoped_ptr<RasterWorkerPool>(new FakeRasterWorkerPool),
1,
std::numeric_limits<unsigned>::max(),
- NULL) {}
+ NULL),
+ in_bundle_cleanup_(false) {}
FakeTileManager::FakeTileManager(TileManagerClient* client,
ResourceProvider* resource_provider)
@@ -64,7 +65,8 @@ FakeTileManager::FakeTileManager(TileManagerClient* client,
make_scoped_ptr<RasterWorkerPool>(new FakeRasterWorkerPool),
1,
std::numeric_limits<unsigned>::max(),
- NULL) {}
+ NULL),
+ in_bundle_cleanup_(false) {}
FakeTileManager::FakeTileManager(TileManagerClient* client,
ResourceProvider* resource_provider,
@@ -74,7 +76,8 @@ FakeTileManager::FakeTileManager(TileManagerClient* client,
make_scoped_ptr<RasterWorkerPool>(new FakeRasterWorkerPool),
1,
raster_task_limit_bytes,
- NULL) {}
+ NULL),
+ in_bundle_cleanup_(false) {}
FakeTileManager::~FakeTileManager() {}
@@ -100,7 +103,15 @@ void FakeTileManager::CheckForCompletedTasks() {
void FakeTileManager::Release(Tile* tile) {
TileManager::Release(tile);
+ if (!in_bundle_cleanup_)
+ CleanUpReleasedTiles();
+}
+
+void FakeTileManager::Release(TileBundle* bundle) {
+ TileManager::Release(bundle);
+ in_bundle_cleanup_ = true;
CleanUpReleasedTiles();
+ in_bundle_cleanup_ = false;
}
} // 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