Skip to content
Permalink
Browse files

Don't allocate strings in Debug for DisplayItem

  • Loading branch information
nox authored and jdm committed Oct 12, 2019
1 parent 3da51b4 commit 97d6351202436b999322f152b0fb5bffc98cbbbe
Showing with 12 additions and 12 deletions.
  1. +12 −12 components/layout/display_list/items.rs
@@ -736,20 +736,20 @@ impl fmt::Debug for DisplayItem {
f,
"{} @ {:?} {:?}",
match *self {
DisplayItem::Rectangle(_) => "Rectangle".to_owned(),
DisplayItem::Text(_) => "Text".to_owned(),
DisplayItem::Image(_) => "Image".to_owned(),
DisplayItem::Border(_) => "Border".to_owned(),
DisplayItem::Gradient(_) => "Gradient".to_owned(),
DisplayItem::RadialGradient(_) => "RadialGradient".to_owned(),
DisplayItem::Line(_) => "Line".to_owned(),
DisplayItem::BoxShadow(_) => "BoxShadow".to_owned(),
DisplayItem::PushTextShadow(_) => "PushTextShadow".to_owned(),
DisplayItem::PopAllTextShadows(_) => "PopTextShadow".to_owned(),
DisplayItem::Iframe(_) => "Iframe".to_owned(),
DisplayItem::Rectangle(_) => "Rectangle",
DisplayItem::Text(_) => "Text",
DisplayItem::Image(_) => "Image",
DisplayItem::Border(_) => "Border",
DisplayItem::Gradient(_) => "Gradient",
DisplayItem::RadialGradient(_) => "RadialGradient",
DisplayItem::Line(_) => "Line",
DisplayItem::BoxShadow(_) => "BoxShadow",
DisplayItem::PushTextShadow(_) => "PushTextShadow",
DisplayItem::PopAllTextShadows(_) => "PopTextShadow",
DisplayItem::Iframe(_) => "Iframe",
DisplayItem::PushStackingContext(_) |
DisplayItem::PopStackingContext(_) |
DisplayItem::DefineClipScrollNode(_) => "".to_owned(),
DisplayItem::DefineClipScrollNode(_) => "",
},
self.bounds(),
self.base().clip_rect

0 comments on commit 97d6351

Please sign in to comment.
You can’t perform that action at this time.