diff options
author | bors-servo <release+servo@mozilla.com> | 2013-10-06 21:16:05 -0700 |
---|---|---|
committer | bors-servo <release+servo@mozilla.com> | 2013-10-06 21:16:05 -0700 |
commit | d99e69e24484a41e3acbba1868f602c98ecebf11 (patch) | |
tree | 629d8a01a4599d0763f72709f4e76e764a33ab7d /src | |
parent | f353150bca5db37e45cb1daed47c51b75604f317 (diff) | |
parent | 6aa9104907721d9541ed3a3291945f45f14e85dc (diff) | |
download | servo-d99e69e24484a41e3acbba1868f602c98ecebf11.tar.gz servo-d99e69e24484a41e3acbba1868f602c98ecebf11.zip |
auto merge of #1012 : deokjinkim/servo/glyph_advance_cache, r=ILyoan
#1008 has unnecessary code change. So I want to revert this code.
Diffstat (limited to 'src')
-rw-r--r-- | src/components/gfx/font.rs | 2 | ||||
-rw-r--r-- | src/components/gfx/platform/android/font.rs | 2 | ||||
-rw-r--r-- | src/components/gfx/platform/linux/font.rs | 2 | ||||
-rw-r--r-- | src/components/gfx/platform/macos/font.rs | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/components/gfx/font.rs b/src/components/gfx/font.rs index 9278cc11041..994ee0d91de 100644 --- a/src/components/gfx/font.rs +++ b/src/components/gfx/font.rs @@ -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>; } diff --git a/src/components/gfx/platform/android/font.rs b/src/components/gfx/platform/android/font.rs index a9e20379757..b8b08cc9599 100644 --- a/src/components/gfx/platform/android/font.rs +++ b/src/components/gfx/platform/android/font.rs @@ -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 { diff --git a/src/components/gfx/platform/linux/font.rs b/src/components/gfx/platform/linux/font.rs index a9e20379757..b8b08cc9599 100644 --- a/src/components/gfx/platform/linux/font.rs +++ b/src/components/gfx/platform/linux/font.rs @@ -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 { diff --git a/src/components/gfx/platform/macos/font.rs b/src/components/gfx/platform/macos/font.rs index f38d7600bb9..08978c5d063 100644 --- a/src/components/gfx/platform/macos/font.rs +++ b/src/components/gfx/platform/macos/font.rs @@ -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], |