diff options
author | Patrick Walton <pcwalton@mimiga.net> | 2014-02-14 22:25:18 -0800 |
---|---|---|
committer | Patrick Walton <pcwalton@mimiga.net> | 2014-02-24 18:12:44 -0800 |
commit | f699ca975f283ae05586f0ffdca913f795c5f8e4 (patch) | |
tree | 7dd2ad65c30135988f0027881a52f75740ed0c10 /src | |
parent | 282bd1d0318c9ef6494bbff16214e040d4ca2d58 (diff) | |
download | servo-f699ca975f283ae05586f0ffdca913f795c5f8e4.tar.gz servo-f699ca975f283ae05586f0ffdca913f795c5f8e4.zip |
layout: Create a font context in sequential mode
Diffstat (limited to 'src')
-rw-r--r-- | src/components/main/layout/layout_task.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/components/main/layout/layout_task.rs b/src/components/main/layout/layout_task.rs index b8e8b022c9a..2f70d0ea499 100644 --- a/src/components/main/layout/layout_task.rs +++ b/src/components/main/layout/layout_task.rs @@ -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(), || { |