Chromium Code Reviews| Index: cc/layers/picture_layer_impl.cc |
| diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc |
| index e60d425f6c9d2bd554a605701f00bf3ea6060e11..ca85339b3abecc290708db963bf16ad0769b411b 100644 |
| --- a/cc/layers/picture_layer_impl.cc |
| +++ b/cc/layers/picture_layer_impl.cc |
| @@ -538,12 +538,18 @@ void PictureLayerImpl::UpdateRasterSource( |
| return; |
| } |
| + tilings_->RemoveTilingsBelowScale(MinimumContentsScale()); |
|
enne (OOO)
2015/03/31 19:53:02
I'm not 100% on moving this. I agree that somethi
vmpstr
2015/04/01 23:53:41
I moved back into both functions (as it would have
|
| + tilings_->RemoveTilingsAboveScale(MaximumContentsScale()); |
| // We could do this after doing UpdateTiles, which would avoid doing this for |
| // tilings that are going to disappear on the pending tree (if scale changed). |
| // But that would also be more complicated, so we just do it here for now. |
| - tilings_->UpdateTilingsToCurrentRasterSource( |
| - raster_source_, pending_set, invalidation_, MinimumContentsScale(), |
| - MaximumContentsScale()); |
| + if (pending_set) { |
| + tilings_->UpdateTilingsToCurrentRasterSourceForActivation( |
| + raster_source_, pending_set, invalidation_); |
| + } else { |
| + tilings_->UpdateTilingsToCurrentRasterSourceForCommit(raster_source_, |
| + invalidation_); |
| + } |
| } |
| void PictureLayerImpl::UpdateCanUseLCDTextAfterCommit() { |
| @@ -562,10 +568,12 @@ void PictureLayerImpl::UpdateCanUseLCDTextAfterCommit() { |
| // a new one must be created and all tiles recreated. |
| scoped_refptr<RasterSource> new_raster_source = |
| raster_source_->CreateCloneWithoutLCDText(); |
| + raster_source_.swap(new_raster_source); |
| + |
| // Synthetically invalidate everything. |
| gfx::Rect bounds_rect(bounds()); |
| - Region invalidation(bounds_rect); |
| - UpdateRasterSource(new_raster_source, &invalidation, nullptr); |
| + invalidation_ = Region(bounds_rect); |
| + tilings_->UpdateRasterSourceDueToLCDChange(raster_source_, invalidation_); |
| SetUpdateRect(bounds_rect); |
| DCHECK(!RasterSourceUsesLCDText()); |