Skip to content

Commit

Permalink
Add -Z wr-record
Browse files Browse the repository at this point in the history
  • Loading branch information
vvuk committed Nov 16, 2016
1 parent ef74d8d commit 6690fc8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/servo/lib.rs
Expand Up @@ -165,7 +165,7 @@ impl<Window> Browser<Window> where Window: WindowMethods + 'static {
enable_msaa: opts.use_msaa,
enable_profiler: opts.webrender_stats,
debug: opts.webrender_debug,
enable_recording: false,
enable_recording: opts.webrender_record,
precache_shaders: opts.precache_shaders,
enable_scrollbars: opts.output_file.is_none(),
renderer_kind: renderer_kind,
Expand Down
9 changes: 9 additions & 0 deletions components/util/opts.rs
Expand Up @@ -206,6 +206,9 @@ pub struct Opts {
/// True to show webrender debug on screen.
pub webrender_debug: bool,

/// True if webrender recording should be enabled.
pub webrender_record: bool,

/// True to compile all webrender shaders at init time. This is mostly
/// useful when modifying the shaders, to ensure they all compile
/// after each change is made.
Expand Down Expand Up @@ -325,6 +328,9 @@ pub struct DebugOptions {
/// Show webrender debug on screen.
pub webrender_debug: bool,

/// Enable webrender recording.
pub webrender_record: bool,

/// Use multisample antialiasing in WebRender.
pub use_msaa: bool,

Expand Down Expand Up @@ -377,6 +383,7 @@ impl DebugOptions {
"disable-vsync" => debug_options.disable_vsync = true,
"wr-stats" => debug_options.webrender_stats = true,
"wr-debug" => debug_options.webrender_debug = true,
"wr-record" => debug_options.webrender_record = true,
"msaa" => debug_options.use_msaa = true,
"full-backtraces" => debug_options.full_backtraces = true,
"precache-shaders" => debug_options.precache_shaders = true,
Expand Down Expand Up @@ -558,6 +565,7 @@ pub fn default_opts() -> Opts {
full_backtraces: false,
is_printing_version: false,
webrender_debug: false,
webrender_record: false,
precache_shaders: false,
signpost: false,
}
Expand Down Expand Up @@ -861,6 +869,7 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
full_backtraces: debug_options.full_backtraces,
is_printing_version: is_printing_version,
webrender_debug: debug_options.webrender_debug,
webrender_record: debug_options.webrender_record,
precache_shaders: debug_options.precache_shaders,
signpost: debug_options.signpost,
};
Expand Down

0 comments on commit 6690fc8

Please sign in to comment.