| Index: cc/picture_layer_impl.cc
|
| diff --git a/cc/picture_layer_impl.cc b/cc/picture_layer_impl.cc
|
| index fc0e9d0952ba72ff45a05da559b6c6cb73c815de..2b94fd2cc5939d11babaa7802d7773b7b5de918b 100644
|
| --- a/cc/picture_layer_impl.cc
|
| +++ b/cc/picture_layer_impl.cc
|
| @@ -216,10 +216,22 @@ void PictureLayerImpl::dumpLayerProperties(std::string*, int indent) const {
|
| }
|
|
|
| void PictureLayerImpl::updateTilePriorities() {
|
| + if (!tilings_->num_tilings())
|
| + return;
|
| +
|
| int current_source_frame_number = layerTreeImpl()->source_frame_number();
|
| double current_frame_time =
|
| (layerTreeImpl()->CurrentFrameTime() - base::TimeTicks()).InSecondsF();
|
|
|
| + bool has_tiling_that_needs_update = false;
|
| + for (size_t i = 0; i < tilings_->num_tilings(); ++i) {
|
| + if (tilings_->tiling_at(i)->needs_update_tile_priorities(
|
| + current_source_frame_number, current_frame_time))
|
| + has_tiling_that_needs_update = true;
|
| + }
|
| + if (!has_tiling_that_needs_update)
|
| + return;
|
| +
|
| gfx::Transform current_screen_space_transform =
|
| screenSpaceTransform();
|
|
|
| @@ -504,6 +516,7 @@ PictureLayerTiling* PictureLayerImpl::AddTiling(float contents_scale) {
|
| DCHECK(contents_scale >= layerTreeImpl()->settings().minimumContentsScale);
|
|
|
| PictureLayerTiling* tiling = tilings_->AddTiling(contents_scale);
|
| + layerTreeImpl()->set_needs_update_tile_priorities();
|
|
|
| const Region& recorded = pile_->recorded_region();
|
| DCHECK(!recorded.IsEmpty());
|
|
|