зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1654279 - Avoid some allocations in ClipChainStack::push_surface. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D84498
This commit is contained in:
Родитель
09a0c9b415
Коммит
a1adedf053
|
@ -914,7 +914,7 @@ impl ClipChainStack {
|
|||
maybe_shared_clips: &[ClipInstance],
|
||||
spatial_tree: &SpatialTree,
|
||||
) {
|
||||
let mut shared_clips = Vec::new();
|
||||
let mut shared_clips = Vec::with_capacity(maybe_shared_clips.len());
|
||||
|
||||
// If there are clips in the shared list for a picture cache, only include
|
||||
// them if they are simple, axis-aligned clips (i.e. in the root coordinate
|
||||
|
@ -933,7 +933,7 @@ impl ClipChainStack {
|
|||
}
|
||||
|
||||
let level = ClipChainLevel {
|
||||
shared_clips: shared_clips.to_vec(),
|
||||
shared_clips,
|
||||
first_clip_index: self.clips.len(),
|
||||
initial_clip_counts_len: self.clip_counts.len(),
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче