| Index: cc/layers/picture_layer_impl.cc
|
| diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
|
| index 81f44c0fb09c630ed3b9c3797f699374722aae21..df2d2fe4048c21995eb939e23d171f78e26e5499 100644
|
| --- a/cc/layers/picture_layer_impl.cc
|
| +++ b/cc/layers/picture_layer_impl.cc
|
| @@ -600,9 +600,10 @@ void PictureLayerImpl::DidBeginTracing() {
|
| }
|
|
|
| void PictureLayerImpl::ReleaseResources() {
|
| + // Recreate tilings with new settings, since some of those might change when
|
| + // we release resources. If tilings_ is null, then leave it as null.
|
| if (tilings_)
|
| - RemoveAllTilings();
|
| -
|
| + tilings_ = CreatePictureLayerTilingSet();
|
| ResetRasterScale();
|
|
|
| // To avoid an edge case after lost context where the tree is up to date but
|
| @@ -672,22 +673,6 @@ TilePriority::PriorityBin PictureLayerImpl::GetMaxTilePriorityBin() const {
|
| return TilePriority::NOW;
|
| }
|
|
|
| -size_t PictureLayerImpl::GetMaxTilesForInterestArea() const {
|
| - return layer_tree_impl()->settings().max_tiles_for_interest_area;
|
| -}
|
| -
|
| -float PictureLayerImpl::GetSkewportTargetTimeInSeconds() const {
|
| - return layer_tree_impl()->use_gpu_rasterization()
|
| - ? 0.f
|
| - : layer_tree_impl()->settings().skewport_target_time_in_seconds;
|
| -}
|
| -
|
| -int PictureLayerImpl::GetSkewportExtrapolationLimitInContentPixels() const {
|
| - return layer_tree_impl()
|
| - ->settings()
|
| - .skewport_extrapolation_limit_in_content_pixels;
|
| -}
|
| -
|
| bool PictureLayerImpl::RequiresHighResToDraw() const {
|
| return layer_tree_impl()->RequiresHighResToDraw();
|
| }
|
| @@ -863,7 +848,7 @@ void PictureLayerImpl::DoPostCommitInitialization() {
|
| DCHECK(layer_tree_impl()->IsPendingTree());
|
|
|
| if (!tilings_)
|
| - tilings_ = PictureLayerTilingSet::Create(this);
|
| + tilings_ = CreatePictureLayerTilingSet();
|
|
|
| PictureLayerImpl* twin_layer = GetPendingOrActiveTwinLayer();
|
| if (twin_layer) {
|
| @@ -1200,6 +1185,17 @@ float PictureLayerImpl::MaximumTilingContentsScale() const {
|
| return std::max(max_contents_scale, MinimumContentsScale());
|
| }
|
|
|
| +scoped_ptr<PictureLayerTilingSet>
|
| +PictureLayerImpl::CreatePictureLayerTilingSet() {
|
| + const LayerTreeSettings& settings = layer_tree_impl()->settings();
|
| + return PictureLayerTilingSet::Create(
|
| + this, settings.max_tiles_for_interest_area,
|
| + layer_tree_impl()->use_gpu_rasterization()
|
| + ? 0.f
|
| + : settings.skewport_target_time_in_seconds,
|
| + settings.skewport_extrapolation_limit_in_content_pixels);
|
| +}
|
| +
|
| void PictureLayerImpl::UpdateIdealScales() {
|
| DCHECK(CanHaveTilings());
|
|
|
|
|