Chromium Code Reviews| Index: cc/picture_layer_impl.cc |
| diff --git a/cc/picture_layer_impl.cc b/cc/picture_layer_impl.cc |
| index 161fd83cc54471c0a627b2479b5912ace15cac79..e4c113a5aac5e9ce34d91998d77664cbe8e5b43d 100644 |
| --- a/cc/picture_layer_impl.cc |
| +++ b/cc/picture_layer_impl.cc |
| @@ -169,6 +169,9 @@ void PictureLayerImpl::calculateContentsScale( |
| return; |
| } |
| + float min_contents_scale = layerTreeImpl()->settings().minimumContentsScale; |
| + ideal_contents_scale = std::max(ideal_contents_scale, min_contents_scale); |
| + |
| ManageTilings(ideal_contents_scale); |
| // The content scale and bounds for a PictureLayerImpl is somewhat fictitious. |
| @@ -177,7 +180,7 @@ void PictureLayerImpl::calculateContentsScale( |
| // In order to guarantee that we can fill this integer space with any set of |
| // tilings (and then map back to floating point texture coordinates), the |
| // contents scale must be at least as large as the largest of the tilings. |
| - float max_contents_scale = 1.f; |
| + float max_contents_scale = min_contents_scale; |
|
danakj
2013/01/07 20:24:02
ah, i see, cool
|
| for (size_t i = 0; i < tilings_.num_tilings(); ++i) { |
| const PictureLayerTiling* tiling = tilings_.tiling_at(i); |
| max_contents_scale = std::max(max_contents_scale, tiling->contents_scale()); |
| @@ -251,6 +254,9 @@ ResourceProvider::ResourceId PictureLayerImpl::contentsResourceId() const { |
| } |
| void PictureLayerImpl::AddTiling(float contents_scale, gfx::Size tile_size) { |
| + if (contents_scale < layerTreeImpl()->settings().minimumContentsScale) |
|
danakj
2013/01/07 20:24:02
should this be a dcheck? (having trouble seeing wh
|
| + return; |
| + |
| const PictureLayerTiling* tiling = tilings_.AddTiling( |
| contents_scale, |
| tile_size); |