mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update WR.
* CPU text run optimizations. * Linux subpixel positioning / rasterization. * Update debug flags API. * Update to resource transactions API.
This commit is contained in:
parent
689dadc751
commit
f6a9f15fed
9 changed files with 74 additions and 48 deletions
|
@ -49,7 +49,7 @@ core-graphics = "0.8"
|
|||
core-text = "6.0"
|
||||
|
||||
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
|
||||
freetype = "0.2"
|
||||
freetype = "0.3"
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
servo-fontconfig = "0.2.1"
|
||||
|
|
|
@ -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
|
||||
}));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue