| Index: cc/resources/picture_layer_tiling_set.cc
|
| diff --git a/cc/resources/picture_layer_tiling_set.cc b/cc/resources/picture_layer_tiling_set.cc
|
| index 47d393f19202e54d0f5c9a5a765b07eac52f1e47..d292d83fab2a53d05ba39d7ca579e3db11c2c0cc 100644
|
| --- a/cc/resources/picture_layer_tiling_set.cc
|
| +++ b/cc/resources/picture_layer_tiling_set.cc
|
| @@ -36,15 +36,14 @@ void PictureLayerTilingSet::SetClient(PictureLayerTilingClient* client) {
|
| tilings_[i]->SetClient(client_);
|
| }
|
|
|
| -void PictureLayerTilingSet::SyncTilings(
|
| - const PictureLayerTilingSet& other,
|
| - const gfx::Size& new_layer_bounds,
|
| - const Region& layer_invalidation,
|
| - float minimum_contents_scale) {
|
| +bool PictureLayerTilingSet::SyncTilings(const PictureLayerTilingSet& other,
|
| + const gfx::Size& new_layer_bounds,
|
| + const Region& layer_invalidation,
|
| + float minimum_contents_scale) {
|
| if (new_layer_bounds.IsEmpty()) {
|
| RemoveAllTilings();
|
| layer_bounds_ = new_layer_bounds;
|
| - return;
|
| + return false;
|
| }
|
|
|
| tilings_.reserve(other.tilings_.size());
|
| @@ -60,6 +59,8 @@ void PictureLayerTilingSet::SyncTilings(
|
| --i;
|
| }
|
|
|
| + bool have_high_res_tiling = false;
|
| +
|
| // Add any missing tilings from |other| that meet the minimum.
|
| for (size_t i = 0; i < other.tilings_.size(); ++i) {
|
| float contents_scale = other.tilings_[i]->contents_scale();
|
| @@ -75,6 +76,8 @@ void PictureLayerTilingSet::SyncTilings(
|
|
|
| this_tiling->UpdateTilesToCurrentPile();
|
| this_tiling->CreateMissingTilesInLiveTilesRect();
|
| + if (this_tiling->resolution() == HIGH_RESOLUTION)
|
| + have_high_res_tiling = true;
|
|
|
| DCHECK(this_tiling->tile_size() ==
|
| client_->CalculateTileSize(this_tiling->TilingRect().size()));
|
| @@ -85,11 +88,14 @@ void PictureLayerTilingSet::SyncTilings(
|
| new_layer_bounds,
|
| client_);
|
| new_tiling->set_resolution(other.tilings_[i]->resolution());
|
| + if (new_tiling->resolution() == HIGH_RESOLUTION)
|
| + have_high_res_tiling = true;
|
| tilings_.push_back(new_tiling.Pass());
|
| }
|
| tilings_.sort(LargestToSmallestScaleFunctor());
|
|
|
| layer_bounds_ = new_layer_bounds;
|
| + return have_high_res_tiling;
|
| }
|
|
|
| void PictureLayerTilingSet::RemoveTilesInRegion(const Region& region) {
|
|
|