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

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: perftest fix Created 7 years, 1 month 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
« cc/test/fake_picture_layer_tiling_client.h ('K') | « 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 0ca699f8064bbbb8f19dcea2aa3cb9f955ff6fee..02762c8dd8242207d52e8e3e19f83258fea6ddc2 100644
--- a/cc/test/fake_tile_manager.cc
+++ b/cc/test/fake_tile_manager.cc
@@ -52,7 +52,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)
@@ -61,7 +62,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,
@@ -71,7 +73,8 @@ FakeTileManager::FakeTileManager(TileManagerClient* client,
make_scoped_ptr<RasterWorkerPool>(new FakeRasterWorkerPool),
1,
raster_task_limit_bytes,
- NULL) {}
+ NULL),
+ in_bundle_cleanup_(false) {}
FakeTileManager::~FakeTileManager() {}
@@ -97,7 +100,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
« cc/test/fake_picture_layer_tiling_client.h ('K') | « cc/test/fake_tile_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698