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
|
@ -1809,6 +1809,11 @@ impl ComputedValues {
|
|||
))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn get_font_arc(&self) -> Arc<style_structs::Font> {
|
||||
self.font.clone()
|
||||
}
|
||||
|
||||
% for style_struct in STYLE_STRUCTS:
|
||||
#[inline]
|
||||
pub fn get_${style_struct.name.lower()}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue