auto merge of #1012 : deokjinkim/servo/glyph_advance_cache, r=ILyoan

#1008 has unnecessary code change. So I want to revert this code.
This commit is contained in:
bors-servo 2013-10-06 21:16:05 -07:00
commit d99e69e244
4 changed files with 4 additions and 4 deletions

View file

@ -49,7 +49,7 @@ pub trait FontHandleMethods {
fn clone_with_style(&self, fctx: &FontContextHandle, style: &UsedFontStyle)
-> Result<FontHandle, ()>;
fn glyph_index(&self, codepoint: char) -> Option<GlyphIndex>;
fn glyph_h_advance(&mut self, GlyphIndex) -> Option<FractionalPixel>;
fn glyph_h_advance(&self, GlyphIndex) -> Option<FractionalPixel>;
fn get_metrics(&self) -> FontMetrics;
fn get_table_for_tag(&self, FontTableTag) -> Option<FontTable>;
}

View file

@ -198,7 +198,7 @@ impl FontHandleMethods for FontHandle {
}
#[fixed_stack_segment]
fn glyph_h_advance(&mut self,
fn glyph_h_advance(&self,
glyph: GlyphIndex) -> Option<FractionalPixel> {
assert!(self.face.is_not_null());
unsafe {

View file

@ -198,7 +198,7 @@ impl FontHandleMethods for FontHandle {
}
#[fixed_stack_segment]
fn glyph_h_advance(&mut self,
fn glyph_h_advance(&self,
glyph: GlyphIndex) -> Option<FractionalPixel> {
assert!(self.face.is_not_null());
unsafe {

View file

@ -147,7 +147,7 @@ impl FontHandleMethods for FontHandle {
return Some(glyphs[0] as GlyphIndex);
}
fn glyph_h_advance(&mut self, glyph: GlyphIndex) -> Option<FractionalPixel> {
fn glyph_h_advance(&self, glyph: GlyphIndex) -> Option<FractionalPixel> {
let glyphs = [glyph as CGGlyph];
let advance = self.ctfont.get_advances_for_glyphs(kCTFontDefaultOrientation,
&glyphs[0],