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

Unified Diff: cc/tiles/tile_manager.cc

Issue 1318733006: cc: Do the math for a tile's content rect in layer space once. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
« cc/tiles/tile.cc ('K') | « cc/tiles/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/tiles/tile_manager.cc
diff --git a/cc/tiles/tile_manager.cc b/cc/tiles/tile_manager.cc
index dfb12c248c92e226910831428cf90d023ebc8adf..b0a87cf7556612ec1783beb3d4012cc5689e692b 100644
--- a/cc/tiles/tile_manager.cc
+++ b/cc/tiles/tile_manager.cc
@@ -687,7 +687,7 @@ scoped_refptr<RasterTask> TileManager::CreateRasterTask(
ImageDecodeTask::Vector decode_tasks;
std::vector<skia::PositionPixelRef> pixel_refs;
prioritized_tile.raster_source()->GatherPixelRefs(
- tile->content_rect(), tile->contents_scale(), &pixel_refs);
+ tile->enclosing_layer_rect(), &pixel_refs);
for (const skia::PositionPixelRef& pixel_ref : pixel_refs) {
decode_tasks.push_back(image_decode_controller_.GetTaskForPixelRef(
pixel_ref, tile->layer_id(), prepare_tiles_count_));
@@ -754,18 +754,15 @@ void TileManager::UpdateTileDrawInfo(
client_->NotifyTileStateChanged(tile);
}
-ScopedTilePtr TileManager::CreateTile(const gfx::Size& desired_texture_size,
- const gfx::Rect& content_rect,
- float contents_scale,
+ScopedTilePtr TileManager::CreateTile(const Tile::CreateInfo& info,
int layer_id,
int source_frame_number,
int flags) {
// We need to have a tile task worker pool to do anything meaningful with
// tiles.
DCHECK(tile_task_runner_);
- ScopedTilePtr tile(new Tile(this, desired_texture_size, content_rect,
- contents_scale, layer_id, source_frame_number,
- flags));
+ ScopedTilePtr tile(
+ new Tile(this, info, layer_id, source_frame_number, flags));
DCHECK(tiles_.find(tile->id()) == tiles_.end());
tiles_[tile->id()] = tile.get();
« cc/tiles/tile.cc ('K') | « cc/tiles/tile_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698