mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Get rid of colored boxes.
They were recreating the RNG every frame, which was a bad performance problem.
This commit is contained in:
parent
b536d979cf
commit
077720fc49
1 changed files with 2 additions and 5 deletions
|
@ -28,11 +28,8 @@ trait DefaultStyleMethods {
|
|||
impl NodeKind : DefaultStyleMethods {
|
||||
fn default_color() -> Color {
|
||||
match self {
|
||||
Text(*) => { white() }
|
||||
Element(*) => {
|
||||
let r = rand::rng();
|
||||
rgb(r.next() as u8, r.next() as u8, r.next() as u8)
|
||||
}
|
||||
Text(*) => white(),
|
||||
Element(*) => white()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue