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

Unified Diff: cc/resources/tile_manager.h

Issue 228183002: cc: Move ResourcePool ownership to LTHI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 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/resources/resource_pool.h ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile_manager.h
diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h
index ab937bf7b204d11f0e1b737162241e0bd2110044..79d677f62541fc4b18989b0bdcde31a66deb618c 100644
--- a/cc/resources/tile_manager.h
+++ b/cc/resources/tile_manager.h
@@ -108,7 +108,7 @@ class CC_EXPORT TileManager : public RasterizerClient,
static scoped_ptr<TileManager> Create(
TileManagerClient* client,
- ResourceProvider* resource_provider,
+ ResourcePool* resource_pool,
Rasterizer* rasterizer,
Rasterizer* gpu_rasterizer,
size_t max_raster_usage_bytes,
@@ -146,8 +146,6 @@ class CC_EXPORT TileManager : public RasterizerClient,
void GetPairedPictureLayers(std::vector<PairedPictureLayer>* layers) const;
- ResourcePool* resource_pool() { return resource_pool_.get(); }
-
void InitializeTilesWithResourcesForTesting(const std::vector<Tile*>& tiles) {
for (size_t i = 0; i < tiles.size(); ++i) {
ManagedTileState& mts = tiles[i]->managed_state();
@@ -177,7 +175,7 @@ class CC_EXPORT TileManager : public RasterizerClient,
protected:
TileManager(TileManagerClient* client,
- ResourceProvider* resource_provider,
+ ResourcePool* resource_pool,
Rasterizer* rasterizer,
Rasterizer* gpu_rasterizer,
size_t max_raster_usage_bytes,
@@ -226,7 +224,8 @@ class CC_EXPORT TileManager : public RasterizerClient,
bool was_canceled);
inline size_t BytesConsumedIfAllocated(const Tile* tile) const {
- return Resource::MemorySizeBytes(tile->size(), resource_format_);
+ return Resource::MemorySizeBytes(tile->size(),
+ resource_pool_->resource_format());
}
void FreeResourceForTile(Tile* tile, RasterMode mode);
@@ -240,7 +239,7 @@ class CC_EXPORT TileManager : public RasterizerClient,
void UpdatePrioritizedTileSetIfNeeded();
TileManagerClient* client_;
- scoped_ptr<ResourcePool> resource_pool_;
+ ResourcePool* resource_pool_;
scoped_ptr<RasterizerDelegate> rasterizer_delegate_;
GlobalStateThatImpactsTilePriority global_state_;
« no previous file with comments | « cc/resources/resource_pool.h ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698