| Index: cc/layers/picture_layer_impl.cc
|
| diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
|
| index 6d37b7f4db2f449caaa7a444ad12b904782c7e22..7d3942a645522c54e250a1a63912e54b2c73f440 100644
|
| --- a/cc/layers/picture_layer_impl.cc
|
| +++ b/cc/layers/picture_layer_impl.cc
|
| @@ -1221,6 +1221,7 @@ void PictureLayerImpl::CleanUpTilingsOnActiveLayer(
|
| raster_contents_scale_, ideal_contents_scale_);
|
| float max_acceptable_high_res_scale = std::max(
|
| raster_contents_scale_, ideal_contents_scale_);
|
| + float twin_low_res_scale = 0.f;
|
|
|
| PictureLayerImpl* twin = twin_layer_;
|
| if (twin) {
|
| @@ -1230,6 +1231,12 @@ void PictureLayerImpl::CleanUpTilingsOnActiveLayer(
|
| max_acceptable_high_res_scale = std::max(
|
| max_acceptable_high_res_scale,
|
| std::max(twin->raster_contents_scale_, twin->ideal_contents_scale_));
|
| +
|
| + for (size_t i = 0; i < twin->tilings_->num_tilings(); ++i) {
|
| + PictureLayerTiling* tiling = twin->tilings_->tiling_at(i);
|
| + if (tiling->resolution() == LOW_RESOLUTION)
|
| + twin_low_res_scale = tiling->contents_scale();
|
| + }
|
| }
|
|
|
| std::vector<PictureLayerTiling*> to_remove;
|
| @@ -1243,9 +1250,11 @@ void PictureLayerImpl::CleanUpTilingsOnActiveLayer(
|
| continue;
|
|
|
| // Keep low resolution tilings, if the layer should have them.
|
| - if (tiling->resolution() == LOW_RESOLUTION &&
|
| - layer_tree_impl()->create_low_res_tiling())
|
| - continue;
|
| + if (layer_tree_impl()->create_low_res_tiling()) {
|
| + if (tiling->resolution() == LOW_RESOLUTION ||
|
| + tiling->contents_scale() == twin_low_res_scale)
|
| + continue;
|
| + }
|
|
|
| // Don't remove tilings that are being used (and thus would cause a flash.)
|
| if (std::find(used_tilings.begin(), used_tilings.end(), tiling) !=
|
|
|