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:
Patrick Walton 2014-10-28 14:28:34 -07:00
parent 3aad350a64
commit 93bf69a6fe
4 changed files with 96 additions and 99 deletions

View file

@ -19,7 +19,7 @@ use wrapper::ThreadSafeLayoutNode;
use collections::{Deque, RingBuf};
use geom::{Rect, Size2D};
use gfx::display_list::{ContentLevel, DisplayList};
use gfx::display_list::ContentLevel;
use gfx::font::FontMetrics;
use gfx::font_context::FontContext;
use gfx::text::glyph::CharIndex;
@ -1199,9 +1199,9 @@ impl Flow for InlineFlow {
match fragment.specific {
InlineBlockFragment(ref mut block_flow) => {
let block_flow = block_flow.flow_ref.deref_mut();
self.base.display_list.push_all_move(
mem::replace(&mut flow::mut_base(block_flow).display_list,
DisplayList::new()));
self.base
.display_list
.append_from(&mut flow::mut_base(block_flow).display_list)
}
_ => {}
}