aboutsummaryrefslogtreecommitdiffstats
path: root/components/servo/main.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2016-06-06 19:17:09 -0700
committerPatrick Walton <pcwalton@mimiga.net>2016-06-08 12:29:44 -0700
commit0d963f5bf820f4ee604c2ee059d19e031237a4de (patch)
treea056c5eb2d70d2d153bf4d560d46602374448731 /components/servo/main.rs
parenta259bb38b10e528c0eb4e9900127bc22a9298784 (diff)
downloadservo-0d963f5bf820f4ee604c2ee059d19e031237a4de.tar.gz
servo-0d963f5bf820f4ee604c2ee059d19e031237a4de.zip
servo: Add an `Info.plist` on the Mac and opt into integrated graphics.
Discrete GPUs cause power use problems and tend to perform badly with WebRender. See: * https://developer.apple.com/library/mac/qa/qa1734/_index.html * https://reverse.put.as/2013/05/28/gimmedebugah-how-to-embedded-a-info-plist-into-arbitrary-binaries/
Diffstat (limited to 'components/servo/main.rs')
-rw-r--r--components/servo/main.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/components/servo/main.rs b/components/servo/main.rs
index 361e0f01a75..4622040fa44 100644
--- a/components/servo/main.rs
+++ b/components/servo/main.rs
@@ -37,6 +37,17 @@ use servo::util::opts::{self, ArgumentParsingResult};
use servo::util::panicking::initiate_panic_hook;
use std::rc::Rc;
+pub mod platform {
+ #[cfg(target_os = "macos")]
+ pub use platform::macos::deinit;
+
+ #[cfg(target_os = "macos")]
+ pub mod macos;
+
+ #[cfg(not(target_os = "macos"))]
+ pub fn deinit() {}
+}
+
fn main() {
// Parse the command line options and store them globally
let opts_result = opts::from_cmdline_args(&*args());
@@ -82,6 +93,8 @@ fn main() {
};
unregister_glutin_resize_handler(&window);
+
+ platform::deinit()
}
fn register_glutin_resize_handler(window: &Rc<app::window::Window>,