aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoraydin.kim <aydin.kim@samsung.com>2013-09-10 16:02:14 +0900
committeraydin.kim <aydin.kim@samsung.com>2013-09-11 16:32:48 +0900
commitd907bad78c70bbbfedb1470a5142c0daf8764cf8 (patch)
treeaa38ac6995b2fbf410d92c9db66f785e9d0054d9 /src
parent6289e069d4a5c980d7a079dab9a40b10de3497eb (diff)
downloadservo-d907bad78c70bbbfedb1470a5142c0daf8764cf8.tar.gz
servo-d907bad78c70bbbfedb1470a5142c0daf8764cf8.zip
update android port for language changes
Diffstat (limited to 'src')
-rw-r--r--src/components/gfx/platform/android/font.rs9
-rw-r--r--src/components/gfx/platform/android/font_context.rs2
-rw-r--r--src/components/gfx/platform/android/font_list.rs4
-rw-r--r--src/components/main/platform/common/glut_windowing.rs2
m---------src/support/glut/rust-glut0
m---------src/support/http/rust-http0
6 files changed, 16 insertions, 1 deletions
diff --git a/src/components/gfx/platform/android/font.rs b/src/components/gfx/platform/android/font.rs
index aff744cae2d..2bc62b76a53 100644
--- a/src/components/gfx/platform/android/font.rs
+++ b/src/components/gfx/platform/android/font.rs
@@ -62,6 +62,7 @@ pub struct FontHandle {
#[unsafe_destructor]
impl Drop for FontHandle {
+ #[fixed_stack_segment]
fn drop(&self) {
assert!(self.face.is_not_null());
unsafe {
@@ -99,6 +100,7 @@ impl FontHandleMethods for FontHandle {
Err(()) => Err(())
};
+ #[fixed_stack_segment]
fn create_face_from_buffer(lib: FT_Library,
cbuf: *u8, cbuflen: uint, pt_size: float)
-> Result<FT_Face, ()> {
@@ -130,12 +132,14 @@ impl FontHandleMethods for FontHandle {
fn family_name(&self) -> ~str {
unsafe { str::raw::from_c_str((*self.face).family_name) }
}
+ #[fixed_stack_segment]
fn face_name(&self) -> ~str {
unsafe { str::raw::from_c_str(FT_Get_Postscript_Name(self.face)) }
}
fn is_italic(&self) -> bool {
unsafe { (*self.face).style_flags & FT_STYLE_FLAG_ITALIC != 0 }
}
+ #[fixed_stack_segment]
fn boldness(&self) -> CSSFontWeight {
let default_weight = FontWeight400;
if unsafe { (*self.face).style_flags & FT_STYLE_FLAG_BOLD == 0 } {
@@ -178,6 +182,7 @@ impl FontHandleMethods for FontHandle {
}
}
+ #[fixed_stack_segment]
fn glyph_index(&self,
codepoint: char) -> Option<GlyphIndex> {
assert!(self.face.is_not_null());
@@ -192,6 +197,7 @@ impl FontHandleMethods for FontHandle {
}
}
+ #[fixed_stack_segment]
fn glyph_h_advance(&self,
glyph: GlyphIndex) -> Option<FractionalPixel> {
assert!(self.face.is_not_null());
@@ -242,6 +248,7 @@ impl FontHandleMethods for FontHandle {
}
impl<'self> FontHandle {
+ #[fixed_stack_segment]
fn set_char_size(face: FT_Face, pt_size: float) -> Result<(), ()>{
let char_width = float_to_fixed_ft(pt_size) as FT_F26Dot6;
let char_height = float_to_fixed_ft(pt_size) as FT_F26Dot6;
@@ -254,6 +261,7 @@ impl<'self> FontHandle {
}
}
+ #[fixed_stack_segment]
pub fn new_from_file(fctx: &FontContextHandle, file: ~str,
style: &SpecifiedFontStyle) -> Result<FontHandle, ()> {
unsafe {
@@ -281,6 +289,7 @@ impl<'self> FontHandle {
}
}
+ #[fixed_stack_segment]
pub fn new_from_file_unstyled(fctx: &FontContextHandle, file: ~str)
-> Result<FontHandle, ()> {
unsafe {
diff --git a/src/components/gfx/platform/android/font_context.rs b/src/components/gfx/platform/android/font_context.rs
index 5a828ee7438..e2a97f55db6 100644
--- a/src/components/gfx/platform/android/font_context.rs
+++ b/src/components/gfx/platform/android/font_context.rs
@@ -17,6 +17,7 @@ struct FreeTypeLibraryHandle {
}
impl Drop for FreeTypeLibraryHandle {
+ #[fixed_stack_segment]
fn drop(&self) {
assert!(self.ctx.is_not_null());
unsafe {
@@ -30,6 +31,7 @@ pub struct FontContextHandle {
}
impl FontContextHandle {
+ #[fixed_stack_segment]
pub fn new() -> FontContextHandle {
unsafe {
let ctx: FT_Library = ptr::null();
diff --git a/src/components/gfx/platform/android/font_list.rs b/src/components/gfx/platform/android/font_list.rs
index a598cebb316..13acbe465ce 100644
--- a/src/components/gfx/platform/android/font_list.rs
+++ b/src/components/gfx/platform/android/font_list.rs
@@ -39,6 +39,7 @@ impl FontListHandle {
FontListHandle { fctx: fctx.clone() }
}
+ #[fixed_stack_segment]
pub fn get_available_families(&self) -> FontFamilyMap {
let mut family_map : FontFamilyMap = HashMap::new();
unsafe {
@@ -62,6 +63,7 @@ impl FontListHandle {
return family_map;
}
+ #[fixed_stack_segment]
pub fn load_variations_for_family(&self, family: @mut FontFamily) {
debug!("getting variations for %?", family);
unsafe {
@@ -138,6 +140,7 @@ struct AutoPattern {
}
impl Drop for AutoPattern {
+ #[fixed_stack_segment]
fn drop(&self) {
unsafe {
FcPatternDestroy(self.pattern);
@@ -145,6 +148,7 @@ impl Drop for AutoPattern {
}
}
+#[fixed_stack_segment]
pub fn path_from_identifier(name: ~str, style: &UsedFontStyle) -> Result<~str, ()> {
unsafe {
let config = FcConfigGetCurrent();
diff --git a/src/components/main/platform/common/glut_windowing.rs b/src/components/main/platform/common/glut_windowing.rs
index e02bc04d7cb..373975a2ca1 100644
--- a/src/components/main/platform/common/glut_windowing.rs
+++ b/src/components/main/platform/common/glut_windowing.rs
@@ -59,7 +59,7 @@ impl WindowMethods<Application> for Window {
/// Creates a new window.
fn new(_: &Application) -> @mut Window {
// Create the GLUT window.
- unsafe { glut::glutInitWindowSize(800, 600); }
+ glut::init_window_size(800, 600);
let glut_window = glut::create_window(~"Servo");
// Create our window object.
diff --git a/src/support/glut/rust-glut b/src/support/glut/rust-glut
-Subproject 24939d67ce465e3a44bb4adac56534c833478da
+Subproject 91b81ab550ce175a868b91ca3290bd9ef64954c
diff --git a/src/support/http/rust-http b/src/support/http/rust-http
-Subproject 3359d73650614921718b84d6c680cd7898b35df
+Subproject 852c2c439b2198989181d52e39e0e8cb28d6417