aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/font_cache_thread.rs
diff options
context:
space:
mode:
authorGlenn Watson <github@intuitionlibrary.com>2017-08-08 07:51:30 +1000
committerGlenn Watson <github@intuitionlibrary.com>2017-08-09 07:05:05 +1000
commitf6a9f15fed1a88949ea45875adc44b48c419f87b (patch)
tree9aa2a85547c3b6e2e52849d6569499c5821d8744 /components/gfx/font_cache_thread.rs
parent689dadc75174eff892e1da9d072ee9f109ede925 (diff)
downloadservo-f6a9f15fed1a88949ea45875adc44b48c419f87b.tar.gz
servo-f6a9f15fed1a88949ea45875adc44b48c419f87b.zip
Update WR.
* CPU text run optimizations. * Linux subpixel positioning / rasterization. * Update debug flags API. * Update to resource transactions API.
Diffstat (limited to 'components/gfx/font_cache_thread.rs')
-rw-r--r--components/gfx/font_cache_thread.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/components/gfx/font_cache_thread.rs b/components/gfx/font_cache_thread.rs
index 9b76a22fa9c..447bff83021 100644
--- a/components/gfx/font_cache_thread.rs
+++ b/components/gfx/font_cache_thread.rs
@@ -348,11 +348,13 @@ impl FontCache {
let webrender_fonts = &mut self.webrender_fonts;
font_key = Some(*webrender_fonts.entry(template.identifier.clone()).or_insert_with(|| {
let font_key = webrender_api.generate_font_key();
+ let mut updates = webrender_api::ResourceUpdates::new();
match (template.bytes_if_in_memory(), template.native_font()) {
- (Some(bytes), _) => webrender_api.add_raw_font(font_key, bytes, 0),
- (None, Some(native_font)) => webrender_api.add_native_font(font_key, native_font),
- (None, None) => webrender_api.add_raw_font(font_key, template.bytes().clone(), 0),
+ (Some(bytes), _) => updates.add_raw_font(font_key, bytes, 0),
+ (None, Some(native_font)) => updates.add_native_font(font_key, native_font),
+ (None, None) => updates.add_raw_font(font_key, template.bytes().clone(), 0),
}
+ webrender_api.update_resources(updates);
font_key
}));
}