diff options
Diffstat (limited to 'components/util/opts.rs')
-rw-r--r-- | components/util/opts.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/components/util/opts.rs b/components/util/opts.rs index 70926438540..81b83d2b273 100644 --- a/components/util/opts.rs +++ b/components/util/opts.rs @@ -191,6 +191,9 @@ pub struct Opts { /// True to show webrender profiling stats on screen. pub webrender_stats: bool, + /// True to show webrender debug on screen. + pub webrender_debug: bool, + /// True if WebRender should use multisample antialiasing. pub use_msaa: bool, @@ -289,6 +292,9 @@ pub struct DebugOptions { /// Show webrender profiling stats on screen. pub webrender_stats: bool, + /// Show webrender debug on screen. + pub webrender_debug: bool, + /// Use multisample antialiasing in WebRender. pub use_msaa: bool, @@ -328,6 +334,7 @@ impl DebugOptions { "load-webfonts-synchronously" => debug_options.load_webfonts_synchronously = true, "disable-vsync" => debug_options.disable_vsync = true, "wr-stats" => debug_options.webrender_stats = true, + "wr-debug" => debug_options.webrender_debug = true, "msaa" => debug_options.use_msaa = true, "full-backtraces" => debug_options.full_backtraces = true, "" => {}, @@ -377,6 +384,7 @@ pub fn print_debug_usage(app: &str) -> ! { print_option("wr-stats", "Show WebRender profiler on screen."); print_option("msaa", "Use multisample antialiasing in WebRender."); print_option("full-backtraces", "Print full backtraces for all errors"); + print_option("wr-debug", "Display webrender tile borders. Must be used with -w option."); println!(""); @@ -511,6 +519,7 @@ pub fn default_opts() -> Opts { config_dir: None, full_backtraces: false, is_printing_version: false, + webrender_debug: false, } } @@ -570,7 +579,6 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult { "config directory following xdg spec on linux platform", ""); opts.optflag("v", "version", "Display servo version information"); - let opt_match = match opts.parse(args) { Ok(m) => m, Err(f) => args_fail(&f.to_string()), @@ -815,6 +823,7 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult { config_dir: opt_match.opt_str("config-dir"), full_backtraces: debug_options.full_backtraces, is_printing_version: is_printing_version, + webrender_debug: debug_options.webrender_debug, }; set_defaults(opts); |