mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
compositor: Remove the is_running_problem_test
setting (#31589)
These tests don't seem to time out any longer and this mechanism is probably better served by some sort of adjustment to `RUST_LOG` in the WPT harness.
This commit is contained in:
parent
48f5ee828c
commit
55f908653f
5 changed files with 11 additions and 67 deletions
|
@ -232,8 +232,6 @@ pub struct IOCompositor<Window: WindowMethods + ?Sized> {
|
||||||
/// Whether to invalidate `prev_offscreen_framebuffer` at the end of the next frame.
|
/// Whether to invalidate `prev_offscreen_framebuffer` at the end of the next frame.
|
||||||
invalidate_prev_offscreen_framebuffer: bool,
|
invalidate_prev_offscreen_framebuffer: bool,
|
||||||
|
|
||||||
is_running_problem_test: bool,
|
|
||||||
|
|
||||||
/// True to exit after page load ('-x').
|
/// True to exit after page load ('-x').
|
||||||
exit_after_load: bool,
|
exit_after_load: bool,
|
||||||
|
|
||||||
|
@ -384,7 +382,6 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
||||||
window: Rc<Window>,
|
window: Rc<Window>,
|
||||||
state: InitialCompositorState,
|
state: InitialCompositorState,
|
||||||
composite_target: CompositeTarget,
|
composite_target: CompositeTarget,
|
||||||
is_running_problem_test: bool,
|
|
||||||
exit_after_load: bool,
|
exit_after_load: bool,
|
||||||
convert_mouse_to_touch: bool,
|
convert_mouse_to_touch: bool,
|
||||||
top_level_browsing_context_id: TopLevelBrowsingContextId,
|
top_level_browsing_context_id: TopLevelBrowsingContextId,
|
||||||
|
@ -426,7 +423,6 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
||||||
next_offscreen_framebuffer: OnceCell::new(),
|
next_offscreen_framebuffer: OnceCell::new(),
|
||||||
prev_offscreen_framebuffer: None,
|
prev_offscreen_framebuffer: None,
|
||||||
invalidate_prev_offscreen_framebuffer: false,
|
invalidate_prev_offscreen_framebuffer: false,
|
||||||
is_running_problem_test,
|
|
||||||
exit_after_load,
|
exit_after_load,
|
||||||
convert_mouse_to_touch,
|
convert_mouse_to_touch,
|
||||||
pending_frames: 0,
|
pending_frames: 0,
|
||||||
|
@ -439,7 +435,6 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
||||||
window: Rc<Window>,
|
window: Rc<Window>,
|
||||||
state: InitialCompositorState,
|
state: InitialCompositorState,
|
||||||
composite_target: CompositeTarget,
|
composite_target: CompositeTarget,
|
||||||
is_running_problem_test: bool,
|
|
||||||
exit_after_load: bool,
|
exit_after_load: bool,
|
||||||
convert_mouse_to_touch: bool,
|
convert_mouse_to_touch: bool,
|
||||||
top_level_browsing_context_id: TopLevelBrowsingContextId,
|
top_level_browsing_context_id: TopLevelBrowsingContextId,
|
||||||
|
@ -448,7 +443,6 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
||||||
window,
|
window,
|
||||||
state,
|
state,
|
||||||
composite_target,
|
composite_target,
|
||||||
is_running_problem_test,
|
|
||||||
exit_after_load,
|
exit_after_load,
|
||||||
convert_mouse_to_touch,
|
convert_mouse_to_touch,
|
||||||
top_level_browsing_context_id,
|
top_level_browsing_context_id,
|
||||||
|
@ -594,14 +588,8 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
||||||
);
|
);
|
||||||
if is_ready && self.pending_frames == 0 {
|
if is_ready && self.pending_frames == 0 {
|
||||||
self.ready_to_save_state = ReadyState::ReadyToSaveImage;
|
self.ready_to_save_state = ReadyState::ReadyToSaveImage;
|
||||||
if self.is_running_problem_test {
|
|
||||||
println!("ready to save image!");
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
self.ready_to_save_state = ReadyState::Unknown;
|
self.ready_to_save_state = ReadyState::Unknown;
|
||||||
if self.is_running_problem_test {
|
|
||||||
println!("resetting ready_to_save_state!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
self.composite_if_necessary(CompositingReason::Headless);
|
self.composite_if_necessary(CompositingReason::Headless);
|
||||||
},
|
},
|
||||||
|
@ -1709,9 +1697,6 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
||||||
// for saving.
|
// for saving.
|
||||||
// Reset the flag so that we check again in the future
|
// Reset the flag so that we check again in the future
|
||||||
// TODO: only reset this if we load a new document?
|
// TODO: only reset this if we load a new document?
|
||||||
if self.is_running_problem_test {
|
|
||||||
println!("was ready to save, resetting ready_to_save_state");
|
|
||||||
}
|
|
||||||
self.ready_to_save_state = ReadyState::Unknown;
|
self.ready_to_save_state = ReadyState::Unknown;
|
||||||
Ok(())
|
Ok(())
|
||||||
},
|
},
|
||||||
|
@ -1728,14 +1713,8 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
||||||
self.start_shutting_down();
|
self.start_shutting_down();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Err(e) => {
|
Err(error) => {
|
||||||
if self.is_running_problem_test {
|
trace!("Unable to composite: {error:?}");
|
||||||
if e != UnableToComposite::NotReadyToPaintImage(
|
|
||||||
NotReadyToPaint::WaitingOnConstellation,
|
|
||||||
) {
|
|
||||||
println!("not ready to composite: {:?}", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1985,17 +1964,11 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn composite_if_necessary(&mut self, reason: CompositingReason) {
|
fn composite_if_necessary(&mut self, reason: CompositingReason) {
|
||||||
if self.composition_request == CompositionRequest::NoCompositingNecessary {
|
trace!(
|
||||||
if self.is_running_problem_test {
|
"Will schedule a composite {reason:?}. Previously was {:?}",
|
||||||
println!("updating composition_request ({:?})", reason);
|
self.composition_request
|
||||||
}
|
);
|
||||||
self.composition_request = CompositionRequest::CompositeNow(reason)
|
self.composition_request = CompositionRequest::CompositeNow(reason)
|
||||||
} else if self.is_running_problem_test {
|
|
||||||
println!(
|
|
||||||
"composition_request is already {:?}",
|
|
||||||
self.composition_request
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn clear_background(&self) {
|
fn clear_background(&self) {
|
||||||
|
|
|
@ -27,8 +27,6 @@ use crate::{pref, set_pref};
|
||||||
/// Global flags for Servo, currently set on the command line.
|
/// Global flags for Servo, currently set on the command line.
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
pub struct Opts {
|
pub struct Opts {
|
||||||
pub is_running_problem_test: bool,
|
|
||||||
|
|
||||||
/// Whether or not the legacy layout system is enabled.
|
/// Whether or not the legacy layout system is enabled.
|
||||||
pub legacy_layout: bool,
|
pub legacy_layout: bool,
|
||||||
|
|
||||||
|
@ -398,7 +396,6 @@ pub fn multiprocess() -> bool {
|
||||||
|
|
||||||
pub fn default_opts() -> Opts {
|
pub fn default_opts() -> Opts {
|
||||||
Opts {
|
Opts {
|
||||||
is_running_problem_test: false,
|
|
||||||
legacy_layout: false,
|
legacy_layout: false,
|
||||||
tile_size: 512,
|
tile_size: 512,
|
||||||
time_profiling: None,
|
time_profiling: None,
|
||||||
|
@ -598,18 +595,6 @@ pub fn from_cmdline_args(mut opts: Options, args: &[String]) -> ArgumentParsingR
|
||||||
DebugOptions::print_usage(app_name)
|
DebugOptions::print_usage(app_name)
|
||||||
}
|
}
|
||||||
|
|
||||||
let cwd = env::current_dir().unwrap();
|
|
||||||
let url_opt = if !opt_match.free.is_empty() {
|
|
||||||
Some(&opt_match.free[0][..])
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
};
|
|
||||||
let is_running_problem_test = url_opt.as_ref().map_or(false, |url| {
|
|
||||||
url.starts_with("http://web-platform.test:8000/2dcontext/drawing-images-to-the-canvas/") ||
|
|
||||||
url.starts_with("http://web-platform.test:8000/_mozilla/mozilla/canvas/") ||
|
|
||||||
url.starts_with("http://web-platform.test:8000/_mozilla/css/canvas_over_area.html")
|
|
||||||
});
|
|
||||||
|
|
||||||
let tile_size: usize = match opt_match.opt_str("s") {
|
let tile_size: usize = match opt_match.opt_str("s") {
|
||||||
Some(tile_size_str) => tile_size_str
|
Some(tile_size_str) => tile_size_str
|
||||||
.parse()
|
.parse()
|
||||||
|
@ -733,6 +718,7 @@ pub fn from_cmdline_args(mut opts: Options, args: &[String]) -> ArgumentParsingR
|
||||||
.opt_strs("user-stylesheet")
|
.opt_strs("user-stylesheet")
|
||||||
.iter()
|
.iter()
|
||||||
.map(|filename| {
|
.map(|filename| {
|
||||||
|
let cwd = env::current_dir().unwrap();
|
||||||
let path = cwd.join(filename);
|
let path = cwd.join(filename);
|
||||||
let url = ServoUrl::from_url(Url::from_file_path(&path).unwrap());
|
let url = ServoUrl::from_url(Url::from_file_path(&path).unwrap());
|
||||||
let mut contents = Vec::new();
|
let mut contents = Vec::new();
|
||||||
|
@ -754,7 +740,6 @@ pub fn from_cmdline_args(mut opts: Options, args: &[String]) -> ArgumentParsingR
|
||||||
|
|
||||||
let opts = Opts {
|
let opts = Opts {
|
||||||
debug: debug_options.clone(),
|
debug: debug_options.clone(),
|
||||||
is_running_problem_test,
|
|
||||||
legacy_layout,
|
legacy_layout,
|
||||||
tile_size,
|
tile_size,
|
||||||
time_profiling,
|
time_profiling,
|
||||||
|
|
|
@ -475,8 +475,6 @@ pub struct Constellation<STF, SWF> {
|
||||||
/// currently being pressed.
|
/// currently being pressed.
|
||||||
pressed_mouse_buttons: u16,
|
pressed_mouse_buttons: u16,
|
||||||
|
|
||||||
is_running_problem_test: bool,
|
|
||||||
|
|
||||||
/// If True, exits on thread failure instead of displaying about:failure
|
/// If True, exits on thread failure instead of displaying about:failure
|
||||||
hard_fail: bool,
|
hard_fail: bool,
|
||||||
|
|
||||||
|
@ -621,7 +619,6 @@ where
|
||||||
initial_window_size: WindowSizeData,
|
initial_window_size: WindowSizeData,
|
||||||
random_pipeline_closure_probability: Option<f32>,
|
random_pipeline_closure_probability: Option<f32>,
|
||||||
random_pipeline_closure_seed: Option<usize>,
|
random_pipeline_closure_seed: Option<usize>,
|
||||||
is_running_problem_test: bool,
|
|
||||||
hard_fail: bool,
|
hard_fail: bool,
|
||||||
enable_canvas_antialiasing: bool,
|
enable_canvas_antialiasing: bool,
|
||||||
canvas_create_sender: Sender<ConstellationCanvasMsg>,
|
canvas_create_sender: Sender<ConstellationCanvasMsg>,
|
||||||
|
@ -807,7 +804,6 @@ where
|
||||||
canvas_ipc_sender,
|
canvas_ipc_sender,
|
||||||
pending_approval_navigations: HashMap::new(),
|
pending_approval_navigations: HashMap::new(),
|
||||||
pressed_mouse_buttons: 0,
|
pressed_mouse_buttons: 0,
|
||||||
is_running_problem_test,
|
|
||||||
hard_fail,
|
hard_fail,
|
||||||
enable_canvas_antialiasing,
|
enable_canvas_antialiasing,
|
||||||
glplayer_threads: state.glplayer_threads,
|
glplayer_threads: state.glplayer_threads,
|
||||||
|
@ -1450,15 +1446,10 @@ where
|
||||||
FromCompositorMsg::IsReadyToSaveImage(pipeline_states) => {
|
FromCompositorMsg::IsReadyToSaveImage(pipeline_states) => {
|
||||||
let is_ready = self.handle_is_ready_to_save_image(pipeline_states);
|
let is_ready = self.handle_is_ready_to_save_image(pipeline_states);
|
||||||
debug!("Ready to save image {:?}.", is_ready);
|
debug!("Ready to save image {:?}.", is_ready);
|
||||||
if self.is_running_problem_test {
|
|
||||||
println!("got ready to save image query, result is {:?}", is_ready);
|
|
||||||
}
|
|
||||||
let is_ready = is_ready == ReadyToSave::Ready;
|
|
||||||
self.compositor_proxy
|
self.compositor_proxy
|
||||||
.send(CompositorMsg::IsReadyToSaveImageReply(is_ready));
|
.send(CompositorMsg::IsReadyToSaveImageReply(
|
||||||
if self.is_running_problem_test {
|
is_ready == ReadyToSave::Ready,
|
||||||
println!("sent response");
|
));
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// Create a new top level browsing context. Will use response_chan to return
|
// Create a new top level browsing context. Will use response_chan to return
|
||||||
// the browsing context id.
|
// the browsing context id.
|
||||||
|
|
|
@ -460,7 +460,6 @@ where
|
||||||
webxr_main_thread,
|
webxr_main_thread,
|
||||||
},
|
},
|
||||||
composite_target,
|
composite_target,
|
||||||
opts.is_running_problem_test,
|
|
||||||
opts.exit_after_load,
|
opts.exit_after_load,
|
||||||
opts.debug.convert_mouse_to_touch,
|
opts.debug.convert_mouse_to_touch,
|
||||||
top_level_browsing_context_id,
|
top_level_browsing_context_id,
|
||||||
|
@ -992,7 +991,6 @@ fn create_constellation(
|
||||||
initial_window_size,
|
initial_window_size,
|
||||||
opts.random_pipeline_closure_probability,
|
opts.random_pipeline_closure_probability,
|
||||||
opts.random_pipeline_closure_seed,
|
opts.random_pipeline_closure_seed,
|
||||||
opts.is_running_problem_test,
|
|
||||||
opts.hard_fail,
|
opts.hard_fail,
|
||||||
!opts.debug.disable_canvas_antialiasing,
|
!opts.debug.disable_canvas_antialiasing,
|
||||||
canvas_create_sender,
|
canvas_create_sender,
|
||||||
|
|
|
@ -96,9 +96,6 @@ pub fn main() {
|
||||||
ArgumentParsingResult::ContentProcess(matches, token) => {
|
ArgumentParsingResult::ContentProcess(matches, token) => {
|
||||||
opts_matches = matches;
|
opts_matches = matches;
|
||||||
content_process_token = Some(token);
|
content_process_token = Some(token);
|
||||||
if opts::get().is_running_problem_test && env::var("RUST_LOG").is_err() {
|
|
||||||
env::set_var("RUST_LOG", "compositing::constellation");
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
ArgumentParsingResult::ChromeProcess(matches) => {
|
ArgumentParsingResult::ChromeProcess(matches) => {
|
||||||
opts_matches = matches;
|
opts_matches = matches;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue