mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Simplify the display list slightly
Now that WebRender uses an Iframe display item, we do not need the Noop item for the non-WebRender path. We can simply reuse the Iframe display item. Also remove the layer_id member from the LayeredItem struct, as it is unused.
This commit is contained in:
parent
e8aeebbac5
commit
474033c39f
3 changed files with 14 additions and 29 deletions
|
@ -744,7 +744,6 @@ pub enum DisplayItem {
|
|||
LineClass(Box<LineDisplayItem>),
|
||||
BoxShadowClass(Box<BoxShadowDisplayItem>),
|
||||
LayeredItemClass(Box<LayeredItem>),
|
||||
NoopClass(Box<BaseDisplayItem>),
|
||||
IframeClass(Box<IframeDisplayItem>),
|
||||
}
|
||||
|
||||
|
@ -1168,9 +1167,6 @@ pub struct LayeredItem {
|
|||
/// Fields common to all display items.
|
||||
pub item: DisplayItem,
|
||||
|
||||
/// The id of the layer this item belongs to.
|
||||
pub layer_id: LayerId,
|
||||
|
||||
/// The id of the layer this item belongs to.
|
||||
pub layer_info: LayerInfo,
|
||||
}
|
||||
|
@ -1251,7 +1247,6 @@ impl DisplayItem {
|
|||
|
||||
DisplayItem::LayeredItemClass(ref item) => item.item.draw_into_context(paint_context),
|
||||
|
||||
DisplayItem::NoopClass(_) => { }
|
||||
DisplayItem::IframeClass(..) => {}
|
||||
}
|
||||
}
|
||||
|
@ -1280,7 +1275,6 @@ impl DisplayItem {
|
|||
DisplayItem::LineClass(ref line) => &line.base,
|
||||
DisplayItem::BoxShadowClass(ref box_shadow) => &box_shadow.base,
|
||||
DisplayItem::LayeredItemClass(ref layered_item) => layered_item.item.base(),
|
||||
DisplayItem::NoopClass(ref base_item) => base_item,
|
||||
DisplayItem::IframeClass(ref iframe) => &iframe.base,
|
||||
}
|
||||
}
|
||||
|
@ -1364,7 +1358,6 @@ impl fmt::Debug for DisplayItem {
|
|||
DisplayItem::BoxShadowClass(_) => "BoxShadow".to_owned(),
|
||||
DisplayItem::LayeredItemClass(ref layered_item) =>
|
||||
format!("LayeredItem({:?})", layered_item.item),
|
||||
DisplayItem::NoopClass(_) => "Noop".to_owned(),
|
||||
DisplayItem::IframeClass(_) => "Iframe".to_owned(),
|
||||
},
|
||||
self.bounds(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue