Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #18322 - glennw:update-wr-fonts-2, r=emilio
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. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18322) <!-- Reviewable:end -->
- Loading branch information
Showing
9 changed files
with
93 additions
and
103 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.