layout: Create a font context in sequential mode

This commit is contained in:
Patrick Walton 2014-02-14 22:25:18 -08:00
parent 282bd1d031
commit f699ca975f

View file

@ -557,6 +557,16 @@ impl LayoutTask {
None
};
// Create a font context, if this is sequential.
//
// FIXME(pcwalton): This is a pretty bogus thing to do. Essentially this is a workaround
// for libgreen having slow TLS.
let mut font_context_opt = if self.parallel_traversal.is_none() {
Some(~FontContext::new(layout_ctx.font_context_info.clone()))
} else {
None
};
let mut layout_root = profile(time::LayoutStyleRecalcCategory,
self.profiler_chan.clone(),
|| {