| Index: cc/layers/tiled_layer.cc
|
| diff --git a/cc/layers/tiled_layer.cc b/cc/layers/tiled_layer.cc
|
| index e73336de4490f099ae0c2d7eeade1918b0fecf45..540e08f0f8a0d4bbd4862aaac400fde40e22fc20 100644
|
| --- a/cc/layers/tiled_layer.cc
|
| +++ b/cc/layers/tiled_layer.cc
|
| @@ -462,12 +462,8 @@ void TiledLayer::UpdateTileTextures(const gfx::Rect& update_rect,
|
| const OcclusionTracker<Layer>* occlusion) {
|
| // The update_rect should be in layer space. So we have to convert the
|
| // paint_rect from content space to layer space.
|
| - float width_scale =
|
| - paint_properties().bounds.width() /
|
| - static_cast<float>(content_bounds().width());
|
| - float height_scale =
|
| - paint_properties().bounds.height() /
|
| - static_cast<float>(content_bounds().height());
|
| + float width_scale = 1 / draw_properties().contents_scale_x;
|
| + float height_scale = 1 / draw_properties().contents_scale_y;
|
| update_rect_ = gfx::ScaleRect(update_rect, width_scale, height_scale);
|
|
|
| // Calling PrepareToUpdate() calls into WebKit to paint, which may have the
|
| @@ -476,8 +472,11 @@ void TiledLayer::UpdateTileTextures(const gfx::Rect& update_rect,
|
| // the SkCanvas until the paint finishes, so we grab a local reference here to
|
| // hold the updater alive until the paint completes.
|
| scoped_refptr<LayerUpdater> protector(Updater());
|
| - Updater()->PrepareToUpdate(
|
| - paint_rect, tiler_->tile_size(), 1.f / width_scale, 1.f / height_scale);
|
| + Updater()->PrepareToUpdate(content_bounds(),
|
| + paint_rect,
|
| + tiler_->tile_size(),
|
| + 1.f / width_scale,
|
| + 1.f / height_scale);
|
|
|
| for (int j = top; j <= bottom; ++j) {
|
| for (int i = left; i <= right; ++i) {
|
|
|