mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
layout: Use the new append_from
method to get rid of a bunch of moves
in display list construction. These were showing up in the profile.
This commit is contained in:
parent
3aad350a64
commit
93bf69a6fe
4 changed files with 96 additions and 99 deletions
|
@ -710,11 +710,10 @@ impl LayoutTask {
|
|||
debug!("Done building display list. Display List = {}",
|
||||
flow::base(layout_root.deref()).display_list);
|
||||
|
||||
let root_display_list =
|
||||
mem::replace(&mut flow::mut_base(layout_root.deref_mut()).display_list,
|
||||
DisplayList::new());
|
||||
root_display_list.debug();
|
||||
let display_list = Arc::new(root_display_list.flatten(ContentStackingLevel));
|
||||
flow::mut_base(&mut *layout_root).display_list.flatten(ContentStackingLevel);
|
||||
let display_list =
|
||||
Arc::new(mem::replace(&mut flow::mut_base(&mut *layout_root).display_list,
|
||||
DisplayList::new()));
|
||||
|
||||
// FIXME(pcwalton): This is really ugly and can't handle overflow: scroll. Refactor
|
||||
// it with extreme prejudice.
|
||||
|
@ -754,7 +753,7 @@ impl LayoutTask {
|
|||
scroll_policy: Scrollable,
|
||||
};
|
||||
|
||||
rw_data.display_list = Some(display_list.clone());
|
||||
rw_data.display_list = Some(display_list);
|
||||
|
||||
// TODO(pcwalton): Eventually, when we have incremental reflow, this will have to
|
||||
// be smarter in order to handle retained layer contents properly from reflow to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue