diff options
Diffstat (limited to 'cc/resources/picture_layer_tiling_set.cc')
-rw-r--r-- | cc/resources/picture_layer_tiling_set.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/cc/resources/picture_layer_tiling_set.cc b/cc/resources/picture_layer_tiling_set.cc index 93d85f7b..7c482bd 100644 --- a/cc/resources/picture_layer_tiling_set.cc +++ b/cc/resources/picture_layer_tiling_set.cc @@ -55,7 +55,8 @@ PictureLayerTilingSet::~PictureLayerTilingSet() { void PictureLayerTilingSet::CopyTilingsAndPropertiesFromPendingTwin( const PictureLayerTilingSet* pending_twin_set, - const scoped_refptr<RasterSource>& raster_source) { + const scoped_refptr<RasterSource>& raster_source, + const Region& layer_invalidation) { if (pending_twin_set->tilings_.empty()) { // If the twin (pending) tiling set is empty, it was not updated for the // current frame. So we drop tilings from our set as well, instead of @@ -77,7 +78,8 @@ void PictureLayerTilingSet::CopyTilingsAndPropertiesFromPendingTwin( this_tiling = tilings_.back(); tiling_sort_required = true; } - this_tiling->CloneTilesAndPropertiesFrom(*pending_twin_tiling); + this_tiling->TakeTilesAndPropertiesFrom(pending_twin_tiling, + layer_invalidation); } if (tiling_sort_required) @@ -95,7 +97,8 @@ void PictureLayerTilingSet::UpdateTilingsToCurrentRasterSourceForActivation( // Copy over tilings that are shared with the |pending_twin_set| tiling set. // Also, copy all of the properties from twin tilings. - CopyTilingsAndPropertiesFromPendingTwin(pending_twin_set, raster_source); + CopyTilingsAndPropertiesFromPendingTwin(pending_twin_set, raster_source, + layer_invalidation); // If the tiling is not shared (FindTilingWithScale returns nullptr), then // invalidate tiles and update them to the new raster source. @@ -146,6 +149,9 @@ void PictureLayerTilingSet::UpdateRasterSourceDueToLCDChange( for (PictureLayerTiling* tiling : tilings_) { tiling->SetRasterSourceAndResize(raster_source); tiling->Invalidate(layer_invalidation); + // Since the invalidation changed, we need to create any missing tiles in + // the live tiles rect again. + tiling->CreateMissingTilesInLiveTilesRect(); tiling->VerifyAllTilesHaveCurrentRasterSource(); } } |