Update webrender to 923ee495bd9b0fda8a4a94c5a6cf42e2f0548731.

This commit is contained in:
Josh Matthews 2018-10-09 14:41:37 -04:00
parent d13172845c
commit 171469c27c
14 changed files with 128 additions and 120 deletions

View file

@ -235,9 +235,11 @@ impl FontHandleMethods for FontHandle {
let mut glyphs: [CGGlyph; 1] = [0 as CGGlyph];
let count: CFIndex = 1;
let result = self
.ctfont
.get_glyphs_for_characters(&characters[0], &mut glyphs[0], count);
let result = unsafe {
self
.ctfont
.get_glyphs_for_characters(&characters[0], &mut glyphs[0], count)
};
if !result {
// No glyph for this character
@ -263,12 +265,14 @@ impl FontHandleMethods for FontHandle {
fn glyph_h_advance(&self, glyph: GlyphId) -> Option<FractionalPixel> {
let glyphs = [glyph as CGGlyph];
let advance = self.ctfont.get_advances_for_glyphs(
kCTFontDefaultOrientation,
&glyphs[0],
ptr::null_mut(),
1,
);
let advance = unsafe {
self.ctfont.get_advances_for_glyphs(
kCTFontDefaultOrientation,
&glyphs[0],
ptr::null_mut(),
1,
)
};
Some(advance as FractionalPixel)
}