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.
|
||||
invalidate_prev_offscreen_framebuffer: bool,
|
||||
|
||||
is_running_problem_test: bool,
|
||||
|
||||
/// True to exit after page load ('-x').
|
||||
exit_after_load: bool,
|
||||
|
||||
|
@ -384,7 +382,6 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
window: Rc<Window>,
|
||||
state: InitialCompositorState,
|
||||
composite_target: CompositeTarget,
|
||||
is_running_problem_test: bool,
|
||||
exit_after_load: bool,
|
||||
convert_mouse_to_touch: bool,
|
||||
top_level_browsing_context_id: TopLevelBrowsingContextId,
|
||||
|
@ -426,7 +423,6 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
next_offscreen_framebuffer: OnceCell::new(),
|
||||
prev_offscreen_framebuffer: None,
|
||||
invalidate_prev_offscreen_framebuffer: false,
|
||||
is_running_problem_test,
|
||||
exit_after_load,
|
||||
convert_mouse_to_touch,
|
||||
pending_frames: 0,
|
||||
|
@ -439,7 +435,6 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
window: Rc<Window>,
|
||||
state: InitialCompositorState,
|
||||
composite_target: CompositeTarget,
|
||||
is_running_problem_test: bool,
|
||||
exit_after_load: bool,
|
||||
convert_mouse_to_touch: bool,
|
||||
top_level_browsing_context_id: TopLevelBrowsingContextId,
|
||||
|
@ -448,7 +443,6 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
window,
|
||||
state,
|
||||
composite_target,
|
||||
is_running_problem_test,
|
||||
exit_after_load,
|
||||
convert_mouse_to_touch,
|
||||
top_level_browsing_context_id,
|
||||
|
@ -594,14 +588,8 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
);
|
||||
if is_ready && self.pending_frames == 0 {
|
||||
self.ready_to_save_state = ReadyState::ReadyToSaveImage;
|
||||
if self.is_running_problem_test {
|
||||
println!("ready to save image!");
|
||||
}
|
||||
} else {
|
||||
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);
|
||||
},
|
||||
|
@ -1709,9 +1697,6 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
// for saving.
|
||||
// Reset the flag so that we check again in the future
|
||||
// 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;
|
||||
Ok(())
|
||||
},
|
||||
|
@ -1728,14 +1713,8 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
self.start_shutting_down();
|
||||
}
|
||||
},
|
||||
Err(e) => {
|
||||
if self.is_running_problem_test {
|
||||
if e != UnableToComposite::NotReadyToPaintImage(
|
||||
NotReadyToPaint::WaitingOnConstellation,
|
||||
) {
|
||||
println!("not ready to composite: {:?}", e);
|
||||
}
|
||||
}
|
||||
Err(error) => {
|
||||
trace!("Unable to composite: {error:?}");
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -1985,17 +1964,11 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
}
|
||||
|
||||
fn composite_if_necessary(&mut self, reason: CompositingReason) {
|
||||
if self.composition_request == CompositionRequest::NoCompositingNecessary {
|
||||
if self.is_running_problem_test {
|
||||
println!("updating composition_request ({:?})", reason);
|
||||
}
|
||||
self.composition_request = CompositionRequest::CompositeNow(reason)
|
||||
} else if self.is_running_problem_test {
|
||||
println!(
|
||||
"composition_request is already {:?}",
|
||||
self.composition_request
|
||||
);
|
||||
}
|
||||
trace!(
|
||||
"Will schedule a composite {reason:?}. Previously was {:?}",
|
||||
self.composition_request
|
||||
);
|
||||
self.composition_request = CompositionRequest::CompositeNow(reason)
|
||||
}
|
||||
|
||||
fn clear_background(&self) {
|
||||
|
|
|
@ -27,8 +27,6 @@ use crate::{pref, set_pref};
|
|||
/// Global flags for Servo, currently set on the command line.
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct Opts {
|
||||
pub is_running_problem_test: bool,
|
||||
|
||||
/// Whether or not the legacy layout system is enabled.
|
||||
pub legacy_layout: bool,
|
||||
|
||||
|
@ -398,7 +396,6 @@ pub fn multiprocess() -> bool {
|
|||
|
||||
pub fn default_opts() -> Opts {
|
||||
Opts {
|
||||
is_running_problem_test: false,
|
||||
legacy_layout: false,
|
||||
tile_size: 512,
|
||||
time_profiling: None,
|
||||
|
@ -598,18 +595,6 @@ pub fn from_cmdline_args(mut opts: Options, args: &[String]) -> ArgumentParsingR
|
|||
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") {
|
||||
Some(tile_size_str) => tile_size_str
|
||||
.parse()
|
||||
|
@ -733,6 +718,7 @@ pub fn from_cmdline_args(mut opts: Options, args: &[String]) -> ArgumentParsingR
|
|||
.opt_strs("user-stylesheet")
|
||||
.iter()
|
||||
.map(|filename| {
|
||||
let cwd = env::current_dir().unwrap();
|
||||
let path = cwd.join(filename);
|
||||
let url = ServoUrl::from_url(Url::from_file_path(&path).unwrap());
|
||||
let mut contents = Vec::new();
|
||||
|
@ -754,7 +740,6 @@ pub fn from_cmdline_args(mut opts: Options, args: &[String]) -> ArgumentParsingR
|
|||
|
||||
let opts = Opts {
|
||||
debug: debug_options.clone(),
|
||||
is_running_problem_test,
|
||||
legacy_layout,
|
||||
tile_size,
|
||||
time_profiling,
|
||||
|
|
|
@ -475,8 +475,6 @@ pub struct Constellation<STF, SWF> {
|
|||
/// currently being pressed.
|
||||
pressed_mouse_buttons: u16,
|
||||
|
||||
is_running_problem_test: bool,
|
||||
|
||||
/// If True, exits on thread failure instead of displaying about:failure
|
||||
hard_fail: bool,
|
||||
|
||||
|
@ -621,7 +619,6 @@ where
|
|||
initial_window_size: WindowSizeData,
|
||||
random_pipeline_closure_probability: Option<f32>,
|
||||
random_pipeline_closure_seed: Option<usize>,
|
||||
is_running_problem_test: bool,
|
||||
hard_fail: bool,
|
||||
enable_canvas_antialiasing: bool,
|
||||
canvas_create_sender: Sender<ConstellationCanvasMsg>,
|
||||
|
@ -807,7 +804,6 @@ where
|
|||
canvas_ipc_sender,
|
||||
pending_approval_navigations: HashMap::new(),
|
||||
pressed_mouse_buttons: 0,
|
||||
is_running_problem_test,
|
||||
hard_fail,
|
||||
enable_canvas_antialiasing,
|
||||
glplayer_threads: state.glplayer_threads,
|
||||
|
@ -1450,15 +1446,10 @@ where
|
|||
FromCompositorMsg::IsReadyToSaveImage(pipeline_states) => {
|
||||
let is_ready = self.handle_is_ready_to_save_image(pipeline_states);
|
||||
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
|
||||
.send(CompositorMsg::IsReadyToSaveImageReply(is_ready));
|
||||
if self.is_running_problem_test {
|
||||
println!("sent response");
|
||||
}
|
||||
.send(CompositorMsg::IsReadyToSaveImageReply(
|
||||
is_ready == ReadyToSave::Ready,
|
||||
));
|
||||
},
|
||||
// Create a new top level browsing context. Will use response_chan to return
|
||||
// the browsing context id.
|
||||
|
|
|
@ -460,7 +460,6 @@ where
|
|||
webxr_main_thread,
|
||||
},
|
||||
composite_target,
|
||||
opts.is_running_problem_test,
|
||||
opts.exit_after_load,
|
||||
opts.debug.convert_mouse_to_touch,
|
||||
top_level_browsing_context_id,
|
||||
|
@ -992,7 +991,6 @@ fn create_constellation(
|
|||
initial_window_size,
|
||||
opts.random_pipeline_closure_probability,
|
||||
opts.random_pipeline_closure_seed,
|
||||
opts.is_running_problem_test,
|
||||
opts.hard_fail,
|
||||
!opts.debug.disable_canvas_antialiasing,
|
||||
canvas_create_sender,
|
||||
|
|
|
@ -96,9 +96,6 @@ pub fn main() {
|
|||
ArgumentParsingResult::ContentProcess(matches, token) => {
|
||||
opts_matches = matches;
|
||||
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) => {
|
||||
opts_matches = matches;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue