Index: cc/resources/tile_manager.cc |
diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc |
index 3ca3b1c503b957be3a1bb39f6c1278e109b9948f..794e08f63cbab5bc450bbe880f99a3c706660405 100644 |
--- a/cc/resources/tile_manager.cc |
+++ b/cc/resources/tile_manager.cc |
@@ -222,6 +222,7 @@ TileManager::TileManager( |
all_tiles_that_need_to_be_rasterized_are_scheduled_(true), |
did_check_for_completed_tasks_since_last_schedule_tasks_(true), |
did_oom_on_last_assign_(false), |
+ resource_format_(tile_task_runner->GetResourceFormat()), |
ready_to_activate_notifier_( |
task_runner_.get(), |
base::Bind(&TileManager::NotifyReadyToActivate, |
@@ -412,7 +413,7 @@ void TileManager::SynchronouslyRasterizeTiles( |
// Run and complete all raster task synchronously. |
rasterizer_->RasterizeTiles( |
- tiles_that_need_to_be_rasterized, resource_pool_, |
+ tiles_that_need_to_be_rasterized, resource_pool_, resource_format_, |
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(), resource_format_); |
} |
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()); |
+ resource_format_); |
const ScopedResource* const_resource = resource.get(); |
// Create and queue all image decode tasks that this tile depends on. |