layout: Add an option to visualize parallel layout

This commit is contained in:
Patrick Walton 2015-02-20 16:46:17 -08:00
parent 172db80703
commit 40a3b41758
14 changed files with 216 additions and 88 deletions

View file

@ -72,12 +72,16 @@ pub struct Opts {
/// debugging purposes (`--show-debug-borders`).
pub show_debug_borders: bool,
/// True if we should show borders on all fragments for debugging purposes (`--show-debug-fragment-borders`).
/// True if we should show borders on all fragments for debugging purposes
/// (`--show-debug-fragment-borders`).
pub show_debug_fragment_borders: bool,
/// True if we should paint tiles with overlays based on which thread painted them.
pub show_debug_parallel_paint: bool,
/// True if we should paint borders around flows based on which thread painted them.
pub show_debug_parallel_layout: bool,
/// If set with --disable-text-aa, disable antialiasing on fonts. This is primarily useful for reftests
/// where pixel perfect results are required when using fonts such as the Ahem
/// font for layout tests.
@ -132,6 +136,7 @@ pub fn print_debug_usage(app: &str) {
print_option("show-compositor-borders", "Paint borders along layer and tile boundaries.");
print_option("show-fragment-borders", "Paint borders along fragment boundaries.");
print_option("show-parallel-paint", "Overlay tiles with colors showing which thread painted them.");
print_option("show-parallel-layout", "Mark which thread laid each flow out with colors.");
print_option("trace-layout", "Write layout trace to an external file for debugging.");
print_option("validate-display-list-geometry",
"Display an error when display list geometry escapes overflow region.");
@ -171,6 +176,7 @@ pub fn default_opts() -> Opts {
show_debug_borders: false,
show_debug_fragment_borders: false,
show_debug_parallel_paint: false,
show_debug_parallel_layout: false,
enable_text_antialiasing: false,
trace_layout: false,
devtools_port: None,
@ -321,6 +327,7 @@ pub fn from_cmdline_args(args: &[String]) -> bool {
show_debug_borders: debug_options.contains(&"show-compositor-borders"),
show_debug_fragment_borders: debug_options.contains(&"show-fragment-borders"),
show_debug_parallel_paint: debug_options.contains(&"show-parallel-paint"),
show_debug_parallel_layout: debug_options.contains(&"show-parallel-layout"),
enable_text_antialiasing: !debug_options.contains(&"disable-text-aa"),
dump_flow_tree: debug_options.contains(&"dump-flow-tree"),
validate_display_list_geometry: debug_options.contains(&"validate-display-list-geometry"),