Bug 1476368 - Avoid moving picture primitives when destroying them. r=gw

--HG--
extra : source : 88f409bc495a135764d75ac22802c2fca94d7be3
extra : histedit_source : fa57c05c5227b676ba5f7c582c00b6d1511d89be
This commit is contained in:
Nicolas Silva 2019-02-19 18:39:06 +01:00
parent 83085f11a5
commit f9b5d37783
2 changed files with 4 additions and 6 deletions

View File

@ -2266,7 +2266,7 @@ impl PicturePrimitive {
/// gives a picture a chance to retain any cached tiles that
/// may be useful during the next scene build.
pub fn destroy(
mut self,
&mut self,
retained_tiles: &mut RetainedTiles,
clip_scroll_tree: &ClipScrollTree,
) {
@ -2279,9 +2279,7 @@ impl PicturePrimitive {
clip_scroll_tree,
);
for tile in tile_cache.tiles {
retained_tiles.tiles.push(tile);
}
retained_tiles.tiles.extend(tile_cache.tiles);
}
}

View File

@ -1700,11 +1700,11 @@ impl PrimitiveStore {
/// Destroy an existing primitive store. This is called just before
/// a primitive store is replaced with a newly built scene.
pub fn destroy(
self,
mut self,
retained_tiles: &mut RetainedTiles,
clip_scroll_tree: &ClipScrollTree,
) {
for pic in self.pictures {
for pic in &mut self.pictures {
pic.destroy(
retained_tiles,
clip_scroll_tree,