diff options
author | Josh Matthews <josh@joshmatthews.net> | 2020-06-11 14:07:39 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2020-06-11 14:07:39 -0400 |
commit | b39955df678a739bfd608cabe3b51f07003d01f4 (patch) | |
tree | 69f530979664101a43ab1ba8e94bf285e710c034 /components/gfx/font_cache_thread.rs | |
parent | a34d1573b6d79211f0efeafcc3ae4b505280cb54 (diff) | |
download | servo-b39955df678a739bfd608cabe3b51f07003d01f4.tar.gz servo-b39955df678a739bfd608cabe3b51f07003d01f4.zip |
Update webrender.
Diffstat (limited to 'components/gfx/font_cache_thread.rs')
-rw-r--r-- | components/gfx/font_cache_thread.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/components/gfx/font_cache_thread.rs b/components/gfx/font_cache_thread.rs index 45eead2357d..21771b151da 100644 --- a/components/gfx/font_cache_thread.rs +++ b/components/gfx/font_cache_thread.rs @@ -182,10 +182,13 @@ impl FontCache { Command::GetFontInstance(font_key, size, result) => { let webrender_api = &self.webrender_api; - let instance_key = *self - .font_instances - .entry((font_key, size)) - .or_insert_with(|| webrender_api.add_font_instance(font_key, size)); + let instance_key = + *self + .font_instances + .entry((font_key, size)) + .or_insert_with(|| { + webrender_api.add_font_instance(font_key, size.to_f32_px()) + }); let _ = result.send(instance_key); }, |