Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few small bits of refactoring to prepare for more advanced DisplayList layerization #7710

Merged
merged 3 commits into from Sep 24, 2015
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Remove an unused function

  • Loading branch information
mrobinson committed Sep 22, 2015
commit 31a5eea823ac983374b466c8a27a39d0546d1c85
@@ -118,27 +118,6 @@ impl DisplayList {
}
}

/// Sort all children by their z-index and split layered children into their own
/// section of the display list.
/// TODO(mrobinson): This should properly handle unlayered children that are on
/// top of layered children.
#[inline]
pub fn sort_and_layerize_children(&mut self) {
let mut children: SmallVec<[Arc<StackingContext>; 8]> = SmallVec::new();
while let Some(stacking_context) = self.children.pop_front() {
children.push(stacking_context);
}
children.sort_by(|this, other| this.z_index.cmp(&other.z_index));

for stacking_context in children.into_iter() {
match stacking_context.layer_id {
Some(layer_id) => self.layered_children.push_back(
PaintLayer::new(layer_id, color::transparent(), stacking_context)),
None => self.children.push_back(stacking_context),
}
}
}

/// Appends all display items from `other` into `self`, preserving stacking order and emptying
/// `other` in the process.
#[inline]
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.