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

Unified Diff: cc/resources/tile_manager.cc

Issue 860813002: Remove the default format from ResourcePool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ResourceFormat from TileManager and call TileTaskRunner::GetResourceFormat() directly instea… Created 5 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/resources/tile_manager.h ('k') | cc/resources/tile_manager_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile_manager.cc
diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc
index 3ca3b1c503b957be3a1bb39f6c1278e109b9948f..4894328ac7f38c35cf0d01b5106616243e653c54 100644
--- a/cc/resources/tile_manager.cc
+++ b/cc/resources/tile_manager.cc
@@ -413,6 +413,7 @@ void TileManager::SynchronouslyRasterizeTiles(
// Run and complete all raster task synchronously.
rasterizer_->RasterizeTiles(
tiles_that_need_to_be_rasterized, resource_pool_,
+ tile_task_runner_->GetResourceFormat(),
base::Bind(&TileManager::UpdateTileDrawInfo, base::Unretained(this)));
// Use on-demand raster for any required-for-draw tiles that have not been
@@ -622,7 +623,7 @@ void TileManager::AssignGpuMemoryToTiles(
MemoryUsage memory_required_by_tile_to_be_scheduled;
if (!tile->raster_task_.get()) {
memory_required_by_tile_to_be_scheduled = MemoryUsage::FromConfig(
- tile->desired_texture_size(), resource_pool_->default_format());
+ tile->desired_texture_size(), tile_task_runner_->GetResourceFormat());
}
bool tile_is_needed_now = priority.priority_bin == TilePriority::NOW;
@@ -756,7 +757,7 @@ scoped_refptr<ImageDecodeTask> TileManager::CreateImageDecodeTask(
scoped_refptr<RasterTask> TileManager::CreateRasterTask(Tile* tile) {
scoped_ptr<ScopedResource> resource =
resource_pool_->AcquireResource(tile->desired_texture_size(),
- resource_pool_->default_format());
+ tile_task_runner_->GetResourceFormat());
const ScopedResource* const_resource = resource.get();
// Create and queue all image decode tasks that this tile depends on.
« no previous file with comments | « cc/resources/tile_manager.h ('k') | cc/resources/tile_manager_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698