mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Cache last fontgroup. Style recalc on wikipedia/rust 66ms -> 41ms.
This commit is contained in:
parent
012a80cc18
commit
b1c226778f
6 changed files with 36 additions and 13 deletions
|
@ -8,7 +8,7 @@ use std::string;
|
|||
use std::rc::Rc;
|
||||
use std::cell::RefCell;
|
||||
use servo_util::cache::{Cache, HashCache};
|
||||
use servo_util::smallvec::{SmallVec, SmallVec1};
|
||||
use servo_util::smallvec::{SmallVec, SmallVec8};
|
||||
use style::computed_values::{font_variant, font_weight};
|
||||
use style::style_structs::Font as FontStyle;
|
||||
use sync::Arc;
|
||||
|
@ -165,11 +165,11 @@ impl Font {
|
|||
}
|
||||
|
||||
pub struct FontGroup {
|
||||
pub fonts: SmallVec1<Rc<RefCell<Font>>>,
|
||||
pub fonts: SmallVec8<Rc<RefCell<Font>>>,
|
||||
}
|
||||
|
||||
impl FontGroup {
|
||||
pub fn new(fonts: SmallVec1<Rc<RefCell<Font>>>) -> FontGroup {
|
||||
pub fn new(fonts: SmallVec8<Rc<RefCell<Font>>>) -> FontGroup {
|
||||
FontGroup {
|
||||
fonts: fonts,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue