Get rid of colored boxes.

They were recreating the RNG every frame, which was a bad performance problem.
This commit is contained in:
Patrick Walton 2012-08-16 18:21:58 -07:00
parent b536d979cf
commit 077720fc49

View file

@ -28,11 +28,8 @@ trait DefaultStyleMethods {
impl NodeKind : DefaultStyleMethods { impl NodeKind : DefaultStyleMethods {
fn default_color() -> Color { fn default_color() -> Color {
match self { match self {
Text(*) => { white() } Text(*) => white(),
Element(*) => { Element(*) => white()
let r = rand::rng();
rgb(r.next() as u8, r.next() as u8, r.next() as u8)
}
} }
} }