| Index: cc/tiles/tile_manager.cc
|
| diff --git a/cc/tiles/tile_manager.cc b/cc/tiles/tile_manager.cc
|
| index ed30f468df20d007e762e907d9af49c54afd01d3..f80a9aba4bba183b02377f3f0be3948a3e183ae9 100644
|
| --- a/cc/tiles/tile_manager.cc
|
| +++ b/cc/tiles/tile_manager.cc
|
| @@ -63,6 +63,7 @@ class RasterTaskImpl : public TileTask {
|
| content_rect_(tile->content_rect()),
|
| invalid_content_rect_(invalidated_rect),
|
| contents_scale_(tile->contents_scale()),
|
| + contents_translation_(tile->contents_translation()),
|
| playback_settings_(playback_settings),
|
| tile_resolution_(tile_resolution),
|
| layer_id_(tile->layer_id()),
|
| @@ -91,7 +92,8 @@ class RasterTaskImpl : public TileTask {
|
|
|
| raster_buffer_->Playback(raster_source_.get(), content_rect_,
|
| invalid_content_rect_, new_content_id_,
|
| - contents_scale_, playback_settings_);
|
| + contents_scale_, contents_translation_,
|
| + playback_settings_);
|
| }
|
|
|
| // Overridden from TileTask:
|
| @@ -126,6 +128,7 @@ class RasterTaskImpl : public TileTask {
|
| gfx::Rect content_rect_;
|
| gfx::Rect invalid_content_rect_;
|
| float contents_scale_;
|
| + gfx::Vector2dF contents_translation_;
|
| RasterSource::PlaybackSettings playback_settings_;
|
| TileResolution tile_resolution_;
|
| int layer_id_;
|
| @@ -641,9 +644,12 @@ 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->content_rect());
|
| + layer_rect.Offset(-tile->contents_translation());
|
| + layer_rect.Scale(1 / tile->contents_scale());
|
| 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();
|
|
|