From a7d18f9c03e3b777b323a16dd030d7087d542aa7 Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Tue, 23 Dec 2014 09:03:36 +1000 Subject: [PATCH 1/3] Switch the default windowing system to glutin. See below for details. This change makes glutin the default windowing system on mac/linux. If you run into any issues with the glutin system, you can temporarily build the GLFW system with the following command: cd components/servo ../../mach cargo build --no-default-features --features=glfw Once any glutin related issues have been sorted out, the GLFW port will be removed. --- components/servo/Cargo.toml | 4 ++-- components/servo/main.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml index 52bdb2b6f31..f42178bb90f 100644 --- a/components/servo/Cargo.toml +++ b/components/servo/Cargo.toml @@ -27,8 +27,8 @@ path = "../../tests/contenttest.rs" harness = false [features] -default = ["glfw_app"] -glutin = ["glutin_app"] +default = ["glutin_app"] +glfw = ["glfw_app"] [dependencies.compositing] path = "../compositing" diff --git a/components/servo/main.rs b/components/servo/main.rs index 235b455ab32..81723d64b04 100644 --- a/components/servo/main.rs +++ b/components/servo/main.rs @@ -14,9 +14,9 @@ extern crate servo; extern crate time; extern crate "util" as servo_util; -#[cfg(all(feature = "glutin",not(test)))] +#[cfg(all(feature = "glutin_app",not(test)))] extern crate "glutin_app" as app; -#[cfg(all(feature = "glfw_app",not(test)))] +#[cfg(all(feature = "glfw",not(test)))] extern crate "glfw_app" as app; #[cfg(not(test))] From 6dd12855ac28f25da4fa609c65b1f3336d5f99c3 Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Tue, 20 Jan 2015 07:53:47 +1000 Subject: [PATCH 2/3] Android doesn't need to explicitly specify glutin now. --- python/servo/build_commands.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index aafaa815af1..78d9fb51318 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -64,10 +64,7 @@ class MachCommands(CommandBase): with cd(path.join(apk_builder_dir, "apk-builder")): subprocess.call(["cargo", "build"], env=self.build_env()) - # FIXME: This can be simplified when glutin becomes the default - # and glfw has been removed. - opts += ["--target", "arm-linux-androideabi", "--no-default-features"] - features += ["glutin"] + opts += ["--target", "arm-linux-androideabi"] if debug_mozjs or self.config["build"]["debug-mozjs"]: features += ["script/debugmozjs"] From a2a74cbb4ff09715c39f270b4bee82cd0459ee64 Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Tue, 20 Jan 2015 09:09:45 +1000 Subject: [PATCH 3/3] Switch linux reftests on glutin to use osmesa software rendering. --- tests/reftest.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/reftest.rs b/tests/reftest.rs index 92c84b28b55..6c483d6d02a 100644 --- a/tests/reftest.rs +++ b/tests/reftest.rs @@ -276,6 +276,9 @@ fn capture(reftest: &Reftest, side: uint) -> (u32, u32, Vec) { if reftest.experimental { command.arg("--experimental"); } + if cfg!(target_os = "linux") { + command.args(["-r", "mesa"].as_slice()); + } let retval = match command.status() { Ok(status) => status, Err(e) => panic!("failed to execute process: {}", e),