| Index: cc/tiles/tile_manager.cc
|
| diff --git a/cc/tiles/tile_manager.cc b/cc/tiles/tile_manager.cc
|
| index ed30f468df20d007e762e907d9af49c54afd01d3..df3ffa2a47e5cf38e26914fa960aae472d85352f 100644
|
| --- a/cc/tiles/tile_manager.cc
|
| +++ b/cc/tiles/tile_manager.cc
|
| @@ -62,7 +62,7 @@ class RasterTaskImpl : public TileTask {
|
| raster_source_(std::move(raster_source)),
|
| content_rect_(tile->content_rect()),
|
| invalid_content_rect_(invalidated_rect),
|
| - contents_scale_(tile->contents_scale()),
|
| + contents_transform_(tile->contents_transform()),
|
| playback_settings_(playback_settings),
|
| tile_resolution_(tile_resolution),
|
| layer_id_(tile->layer_id()),
|
| @@ -91,7 +91,7 @@ class RasterTaskImpl : public TileTask {
|
|
|
| raster_buffer_->Playback(raster_source_.get(), content_rect_,
|
| invalid_content_rect_, new_content_id_,
|
| - contents_scale_, playback_settings_);
|
| + contents_transform_, playback_settings_);
|
| }
|
|
|
| // Overridden from TileTask:
|
| @@ -125,7 +125,7 @@ class RasterTaskImpl : public TileTask {
|
| scoped_refptr<RasterSource> raster_source_;
|
| gfx::Rect content_rect_;
|
| gfx::Rect invalid_content_rect_;
|
| - float contents_scale_;
|
| + ScaleTranslate2d contents_transform_;
|
| RasterSource::PlaybackSettings playback_settings_;
|
| TileResolution tile_resolution_;
|
| int layer_id_;
|
| @@ -641,9 +641,11 @@ TileManager::PrioritizedWorkToSchedule TileManager::AssignGpuMemoryToTiles() {
|
| // TODO(sohanjg): Check if we could use a shared analysis
|
| // canvas which is reset between tiles.
|
| SkColor color = SK_ColorTRANSPARENT;
|
| + gfx::RectF layer_rect = tile->contents_transform().TransformReverse(
|
| + gfx::RectF(tile->content_rect()));
|
| bool is_solid_color =
|
| prioritized_tile.raster_source()->PerformSolidColorAnalysis(
|
| - tile->content_rect(), tile->contents_scale(), &color);
|
| + gfx::ToEnclosingRect(layer_rect), 1.f, &color);
|
| if (is_solid_color) {
|
| tile->draw_info().set_solid_color(color);
|
| tile->draw_info().set_was_ever_ready_to_draw();
|
| @@ -844,7 +846,8 @@ void TileManager::ScheduleTasks(
|
|
|
| std::vector<DrawImage> images;
|
| prioritized_tile.raster_source()->GetDiscardableImagesInRect(
|
| - tile->enclosing_layer_rect(), tile->contents_scale(), &images);
|
| + tile->enclosing_layer_rect(), tile->contents_transform().pre_scale(),
|
| + &images);
|
| ImageDecodeController::TracingInfo tracing_info(
|
| prepare_tiles_count_, prioritized_tile.priority().priority_bin);
|
| for (DrawImage& draw_image : images) {
|
| @@ -960,7 +963,8 @@ scoped_refptr<TileTask> TileManager::CreateRasterTask(
|
| images.clear();
|
| if (!playback_settings.skip_images) {
|
| prioritized_tile.raster_source()->GetDiscardableImagesInRect(
|
| - tile->enclosing_layer_rect(), tile->contents_scale(), &images);
|
| + tile->enclosing_layer_rect(), tile->contents_transform().pre_scale(),
|
| + &images);
|
| }
|
|
|
| // We can skip the image hijack canvas if we have no images.
|
|
|