Chromium Code Reviews| Index: cc/picture_layer.cc |
| diff --git a/cc/picture_layer.cc b/cc/picture_layer.cc |
| index b9ce65a50240b32e79e5b2e4c94c09d4e4ca418c..ab6e2f7ad2e26415ba35497b04dce77d1aabc47b 100644 |
| --- a/cc/picture_layer.cc |
| +++ b/cc/picture_layer.cc |
| @@ -46,8 +46,16 @@ void PictureLayer::pushPropertiesTo(LayerImpl* base_layer) { |
| void PictureLayer::setLayerTreeHost(LayerTreeHost* host) { |
| Layer::setLayerTreeHost(host); |
| - if (host) |
| - pile_->SetMinContentsScale(host->settings().minimumContentsScale); |
| + if (host) { |
| + pile_->SetMinContentsScale(host->settings().minimumContentsScale); |
| + gfx::Size tile_size = host->settings().defaultTileSize; |
| + float scale = host->deviceScaleFactor(); |
| + gfx::Size tile_grid_size( |
| + static_cast<int>(ceil(tile_size.width() / scale)), |
| + static_cast<int>(ceil(tile_size.height() / scale))); |
| + int border_pixels = static_cast<int>(ceil(1.0f / scale)); |
|
enne (OOO)
2013/02/21 18:23:13
I agree that the border pixels are scaled as well,
|
| + pile_->SetTileGridSize(tile_grid_size, border_pixels); |
| + } |
| } |
| void PictureLayer::setNeedsDisplayRect(const gfx::RectF& layer_rect) { |