Skip to content

Commit

Permalink
Remove unused DisplayItem::LayeredItem.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ms2ger committed Oct 18, 2016
1 parent 275278b commit 6d09843
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
16 changes: 0 additions & 16 deletions components/gfx/display_list/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,6 @@ pub enum DisplayItem {
Gradient(Box<GradientDisplayItem>),
Line(Box<LineDisplayItem>),
BoxShadow(Box<BoxShadowDisplayItem>),
LayeredItem(Box<LayeredItem>),
Iframe(Box<IframeDisplayItem>),
PushStackingContext(Box<PushStackingContextItem>),
PopStackingContext(Box<PopStackingContextItem>),
Expand Down Expand Up @@ -1251,16 +1250,6 @@ pub struct BoxShadowDisplayItem {
pub clip_mode: BoxShadowClipMode,
}

/// Contains an item that should get its own layer during layer creation.
#[derive(Clone, HeapSizeOf, Deserialize, Serialize)]
pub struct LayeredItem {
/// Fields common to all display items.
pub item: DisplayItem,

/// The id of the layer this item belongs to.
pub layer_info: LayerInfo,
}

/// Defines a stacking context.
#[derive(Clone, HeapSizeOf, Deserialize, Serialize)]
pub struct PushStackingContextItem {
Expand Down Expand Up @@ -1359,8 +1348,6 @@ impl DisplayItem {
box_shadow.clip_mode);
}

DisplayItem::LayeredItem(ref item) => item.item.draw_into_context(paint_context),

DisplayItem::Iframe(..) => {}

DisplayItem::PushStackingContext(..) => {}
Expand Down Expand Up @@ -1392,7 +1379,6 @@ impl DisplayItem {
DisplayItem::Gradient(ref gradient) => &gradient.base,
DisplayItem::Line(ref line) => &line.base,
DisplayItem::BoxShadow(ref box_shadow) => &box_shadow.base,
DisplayItem::LayeredItem(ref layered_item) => layered_item.item.base(),
DisplayItem::Iframe(ref iframe) => &iframe.base,
DisplayItem::PushStackingContext(ref stacking_context) => &stacking_context.base,
DisplayItem::PopStackingContext(ref item) => &item.base,
Expand Down Expand Up @@ -1492,8 +1478,6 @@ impl fmt::Debug for DisplayItem {
DisplayItem::Gradient(_) => "Gradient".to_owned(),
DisplayItem::Line(_) => "Line".to_owned(),
DisplayItem::BoxShadow(_) => "BoxShadow".to_owned(),
DisplayItem::LayeredItem(ref layered_item) =>
format!("LayeredItem({:?})", layered_item.item),
DisplayItem::Iframe(_) => "Iframe".to_owned(),
DisplayItem::PushStackingContext(_) => "".to_owned(),
DisplayItem::PopStackingContext(_) => "".to_owned(),
Expand Down
3 changes: 0 additions & 3 deletions components/layout/webrender_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,6 @@ impl WebRenderDisplayItemConverter for DisplayItem {
DisplayItem::Line(..) => {
println!("TODO DisplayItem::Line");
}
DisplayItem::LayeredItem(..) => {
panic!("Unexpected in webrender!");
}
DisplayItem::BoxShadow(ref item) => {
let rect = item.base.bounds.to_rectf();
let box_bounds = item.box_bounds.to_rectf();
Expand Down

0 comments on commit 6d09843

Please sign in to comment.