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

Unified Diff: cc/tiles/tile_manager.h

Issue 2612413003: Clean up tile deletion (Closed)
Patch Set: "Fix Tile* comparison in tests" Created 3 years, 11 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/tiles/tile.cc ('k') | cc/tiles/tile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/tile_manager.h
diff --git a/cc/tiles/tile_manager.h b/cc/tiles/tile_manager.h
index 7a47febe84c08d20255dcca96ca1e46723c2fbf5..91ae0a8b4eb2d70ed4004f7119a34c5e52795424 100644
--- a/cc/tiles/tile_manager.h
+++ b/cc/tiles/tile_manager.h
@@ -130,10 +130,10 @@ class CC_EXPORT TileManager {
// date draw information.
void Flush();
- ScopedTilePtr CreateTile(const Tile::CreateInfo& info,
- int layer_id,
- int source_frame_number,
- int flags);
+ std::unique_ptr<Tile> CreateTile(const Tile::CreateInfo& info,
+ int layer_id,
+ int source_frame_number,
+ int flags);
bool IsReadyToActivate() const;
bool IsReadyToDraw() const;
@@ -178,11 +178,6 @@ class CC_EXPORT TileManager {
raster_buffer_provider_ = raster_buffer_provider;
}
- void FreeResourcesAndCleanUpReleasedTilesForTesting() {
- FreeResourcesForReleasedTiles();
- CleanUpReleasedTiles();
- }
-
std::vector<Tile*> AllTilesForTesting() const {
std::vector<Tile*> tiles;
for (auto& tile_pair : tiles_)
@@ -207,17 +202,14 @@ class CC_EXPORT TileManager {
}
void OnRasterTaskCompleted(std::unique_ptr<RasterBuffer> raster_buffer,
- Tile* tile,
+ Tile::Id tile_id,
Resource* resource,
bool was_canceled);
protected:
- void FreeResourcesForReleasedTiles();
- void CleanUpReleasedTiles();
-
friend class Tile;
- // Virtual for testing.
- virtual void Release(Tile* tile);
+ // Must be called by tile during destruction.
+ void Release(Tile* tile);
Tile::Id GetUniqueTileId() { return ++next_tile_id_; }
private:
@@ -326,8 +318,6 @@ class CC_EXPORT TileManager {
RasterTaskCompletionStats flush_stats_;
- std::vector<Tile*> released_tiles_;
-
TaskGraph graph_;
UniqueNotifier more_tiles_need_prepare_check_notifier_;
« no previous file with comments | « cc/tiles/tile.cc ('k') | cc/tiles/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698