Bug 1499786. Update webrender to commit 74f265e447d2927c27d4320c676779956d39eaf0
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Wed, 17 Oct 2018 17:24:12 -0400
changeset 497630 de3d53ed28eed9a6f36aff370b4471703db700bc
parent 497629 8bdbb72ad61b6272b3b7faed01383bb7c5fe7e72
child 497631 8e41c385edb99568fed370ef17d646dceefa00f9
push id9996
push userarchaeopteryx@coole-files.de
push dateThu, 18 Oct 2018 18:37:15 +0000
treeherdermozilla-beta@8efe26839243 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1499786
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1499786. Update webrender to commit 74f265e447d2927c27d4320c676779956d39eaf0
gfx/webrender/src/platform/windows/font.rs
gfx/webrender_bindings/revision.txt
--- a/gfx/webrender/src/platform/windows/font.rs
+++ b/gfx/webrender/src/platform/windows/font.rs
@@ -126,19 +126,30 @@ impl FontContext {
     }
 
     pub fn add_native_font(&mut self, font_key: &FontKey, font_handle: dwrote::FontDescriptor) {
         if self.fonts.contains_key(font_key) {
             return;
         }
 
         let system_fc = dwrote::FontCollection::system();
-        let font = match system_fc.get_font_from_descriptor(&font_handle) {
-            Some(font) => font,
-            None => { panic!("missing descriptor {:?}", font_handle) }
+        // A version of get_font_from_descriptor() that panics early to help with bug 1455848
+        let font = if let Some(family) = system_fc.get_font_family_by_name(&font_handle.family_name) {
+            let font = family.get_first_matching_font(font_handle.weight, font_handle.stretch, font_handle.style);
+            // Exact matches only here
+            if font.weight() == font_handle.weight &&
+                font.stretch() == font_handle.stretch &&
+                font.style() == font_handle.style
+            {
+                font
+            } else {
+                panic!("font mismatch for descriptor {:?} {:?}", font_handle, font.to_descriptor())
+            }
+        } else {
+            panic!("missing font family for descriptor {:?}", font_handle)
         };
         let face = font.create_font_face();
         self.fonts.insert(*font_key, face);
     }
 
     pub fn delete_font(&mut self, font_key: &FontKey) {
         if let Some(_) = self.fonts.remove(font_key) {
             self.variations.retain(|k, _| k.0 != *font_key);
--- a/gfx/webrender_bindings/revision.txt
+++ b/gfx/webrender_bindings/revision.txt
@@ -1,1 +1,1 @@
-a0a36d9b416ca3295f8def384814ffef60903a60
+74f265e447d2927c27d4320c676779956d39eaf0