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/
This commit is contained in:
Patrick Walton 2016-06-06 19:17:09 -07:00
parent a259bb38b1
commit 0d963f5bf8
4 changed files with 56 additions and 0 deletions

View file

@ -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>,