Cache last fontgroup. Style recalc on wikipedia/rust 66ms -> 41ms.

This commit is contained in:
Glenn Watson 2014-10-23 15:50:28 +10:00
parent 012a80cc18
commit b1c226778f
6 changed files with 36 additions and 13 deletions

View file

@ -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()}