Remove/don’t call no-op compute_font_hash method for stylo.

This removes a potentially-costly Arc::mut call.
This commit is contained in:
Simon Sapin 2017-02-26 18:57:35 +01:00
parent 4ad844f7bd
commit e0c63efe01
3 changed files with 9 additions and 11 deletions

View file

@ -2044,12 +2044,14 @@ pub fn apply_declarations<'a, F, I>(viewport_size: Size2D<Au>,
style.set_root_font_size(s);
}
if seen.contains(LonghandId::FontStyle) ||
seen.contains(LonghandId::FontWeight) ||
seen.contains(LonghandId::FontStretch) ||
seen.contains(LonghandId::FontFamily) {
style.mutate_font().compute_font_hash();
}
% if product == "servo":
if seen.contains(LonghandId::FontStyle) ||
seen.contains(LonghandId::FontWeight) ||
seen.contains(LonghandId::FontStretch) ||
seen.contains(LonghandId::FontFamily) {
style.mutate_font().compute_font_hash();
}
% endif
style
}