Auto merge of #22856 - jdm:angle, r=paulrouget

Add optional ANGLE support to glutin port

Supporting ANGLE in Servo has two important benefits:
* we can actually run Servo instances on our Windows CI machines, which gives us more confidence that we're not breaking it
* we can continue to use OpenGL on devices like the Hololens, rather than creating platform-specific graphical backends

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22856)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-05-10 00:04:20 -04:00 committed by GitHub
commit b1b47d8046
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 63 additions and 25 deletions

View file

@ -76,6 +76,10 @@ pub struct Opts {
pub load_webfonts_synchronously: bool,
pub headless: bool,
/// Use ANGLE to create the GL context (Windows-only).
pub angle: bool,
pub hard_fail: bool,
/// True if we should bubble intrinsic widths sequentially (`-b`). If this is true, then
@ -558,6 +562,7 @@ pub fn default_opts() -> Opts {
gc_profile: false,
load_webfonts_synchronously: false,
headless: false,
angle: false,
hard_fail: true,
bubble_inline_sizes_separately: false,
show_debug_fragment_borders: false,
@ -666,6 +671,11 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
"",
);
opts.optflag("z", "headless", "Headless mode");
opts.optflag(
"",
"angle",
"Use ANGLE to create a GL context (Windows-only)",
);
opts.optflag(
"f",
"hard-fail",
@ -998,6 +1008,7 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
gc_profile: debug_options.gc_profile,
load_webfonts_synchronously: debug_options.load_webfonts_synchronously,
headless: opt_match.opt_present("z"),
angle: opt_match.opt_present("angle"),
hard_fail: opt_match.opt_present("f") && !opt_match.opt_present("F"),
bubble_inline_sizes_separately: bubble_inline_sizes_separately,
profile_script_events: debug_options.profile_script_events,

View file

@ -115,4 +115,4 @@ webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]}
webvr_traits = {path = "../webvr_traits"}
[target.'cfg(not(target_os = "ios"))'.dependencies]
mozangle = "0.1"
mozangle = "0.2"