diff options
author | Martin Robinson <mrobinson@igalia.com> | 2015-08-26 08:17:40 -0700 |
---|---|---|
committer | Martin Robinson <mrobinson@igalia.com> | 2015-08-26 10:20:28 -0700 |
commit | 1c09b1d8aae5074669560d81d272414f4d0d2793 (patch) | |
tree | c0ebe440562e9f1c52f08d72075b4daf3a8265ad /components/gfx/paint_task.rs | |
parent | a8c62f0f282321b4e2047c5143c7cbfc3282a09a (diff) | |
download | servo-1c09b1d8aae5074669560d81d272414f4d0d2793.tar.gz servo-1c09b1d8aae5074669560d81d272414f4d0d2793.zip |
Split out layered child stacking contexts in display lists
This patch is in preparation for more dynamic layerization of the
pieces of display lists. It also prevents having to sort the children
by z-index multiple times.
Diffstat (limited to 'components/gfx/paint_task.rs')
-rw-r--r-- | components/gfx/paint_task.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/components/gfx/paint_task.rs b/components/gfx/paint_task.rs index 43ca598c38a..0d0a8bf1e49 100644 --- a/components/gfx/paint_task.rs +++ b/components/gfx/paint_task.rs @@ -28,7 +28,6 @@ use profile_traits::mem::{self, ReportsChan}; use profile_traits::time::{self, profile}; use rand::{self, Rng}; use skia::gl_context::GLContext; -use smallvec::SmallVec; use std::borrow::ToOwned; use std::collections::HashMap; use std::mem as std_mem; @@ -394,14 +393,11 @@ impl<C> PaintTask<C> where C: PaintListener + Send + 'static { } }; - // Sort positioned children according to z-index. - let mut positioned_children: SmallVec<[Arc<StackingContext>; 8]> = SmallVec::new(); - for kid in &stacking_context.display_list.children { - positioned_children.push((*kid).clone()); + for kid in stacking_context.display_list.children.iter() { + build(properties, &**kid, &page_position, &transform, &perspective, next_parent_id) } - positioned_children.sort_by(|this, other| this.z_index.cmp(&other.z_index)); - for kid in positioned_children.iter() { + for kid in stacking_context.display_list.layered_children.iter() { build(properties, &**kid, &page_position, &transform, &perspective, next_parent_id) } } |