Chromium Code Reviews| Index: cc/picture_layer.cc |
| diff --git a/cc/picture_layer.cc b/cc/picture_layer.cc |
| index b9ce65a50240b32e79e5b2e4c94c09d4e4ca418c..b7de08990863a50aec68198fd2b10e6398695418 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(); |
| + // The -2 is to account for border pixels, +0.5 is for rounding |
|
enne (OOO)
2013/02/15 20:39:50
This math doesn't look right. The border texels a
|
| + gfx::Size tile_grid_stride( |
| + static_cast<int>((tile_size.width() - 2) / scale + 0.5f), |
| + static_cast<int>((tile_size.height() - 2) / scale + 0.5f)); |
| + pile_->SetTileGridStride(tile_grid_stride); |
| + } |
| } |
| void PictureLayer::setNeedsDisplayRect(const gfx::RectF& layer_rect) { |