mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
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.
This commit is contained in:
parent
9a9866117a
commit
b015e93dc5
9 changed files with 92 additions and 102 deletions
|
@ -2,10 +2,6 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
extern crate cssparser;
|
||||
extern crate gfx;
|
||||
extern crate ipc_channel;
|
||||
extern crate style;
|
||||
|
||||
#[cfg(test)] mod font_cache_thread;
|
||||
#[cfg(test)] mod text_util;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue