diff options
author | Glenn Watson <github@intuitionlibrary.com> | 2017-08-31 14:58:04 +1000 |
---|---|---|
committer | Glenn Watson <github@intuitionlibrary.com> | 2017-08-31 16:10:30 +1000 |
commit | b015e93dc5cff0e637a2d9e2aa9ff62612c45adf (patch) | |
tree | 182c80c52d6688b948287d386ba5014c3ae8900b /components/layout/webrender_helpers.rs | |
parent | 9a9866117a5e2a7d0e5de56ca70afec62f8b690f (diff) | |
download | servo-b015e93dc5cff0e637a2d9e2aa9ff62612c45adf.tar.gz servo-b015e93dc5cff0e637a2d9e2aa9ff62612c45adf.zip |
Update WR (font instance API).
WR now has a concept of font templates and font instances. This
makes the WR font interfaces closer to Cairo and Gecko, and also
makes some future performance optimizations possible.
A font template is the font family, and data backing the font.
A font instance is a reference to a font template and per-instance
options, such as font size, anti-aliasing settings etc.
To update Servo in a minimally invasive way, I added a new font
cache call, that creates a font instance. This means that when
a font is created, and doesn't exist in the cache there are now
two calls to the font cache thread. We could refactor the font
cache to make this work in one call, which we should do in the
future. However, refactoring the font cache is a large chunk of
work by itself. The extra call is only when a font doesn't already
exist in the font context cache, so it should have minimal
performance impact.
Diffstat (limited to 'components/layout/webrender_helpers.rs')
-rw-r--r-- | components/layout/webrender_helpers.rs | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/components/layout/webrender_helpers.rs b/components/layout/webrender_helpers.rs index 6e5a774e283..32da4981dfc 100644 --- a/components/layout/webrender_helpers.rs +++ b/components/layout/webrender_helpers.rs @@ -288,7 +288,6 @@ impl WebRenderDisplayItemConverter for DisplayItem { &glyphs, item.text_run.font_key, item.text_color, - item.text_run.actual_pt_size, None); } } |