mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Fix for race condition causing reftests to hang under load.
If the root layer has a zero size rectangle, it will never be painted, so assume the pipeline is idle in that case. Re-enable two reftests that were disabled due to this issue.
This commit is contained in:
parent
7ca3c8d6e3
commit
591b10aa58
2 changed files with 15 additions and 6 deletions
|
@ -15,7 +15,7 @@ use std::cmp;
|
|||
use std::mem;
|
||||
use geom::point::{Point2D, TypedPoint2D};
|
||||
use geom::rect::{Rect, TypedRect};
|
||||
use geom::size::TypedSize2D;
|
||||
use geom::size::{Size2D, TypedSize2D};
|
||||
use geom::scale_factor::ScaleFactor;
|
||||
use gfx::color;
|
||||
use gfx::paint_task::Msg as PaintMsg;
|
||||
|
@ -450,8 +450,18 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
return false;
|
||||
}
|
||||
return self.pipeline_details.values().all(|ref details| {
|
||||
details.paint_state == PaintState::Idle
|
||||
});
|
||||
// If a pipeline exists and has a root layer that has
|
||||
// zero size, it will never be painted. In this case,
|
||||
// consider it as idle to avoid hangs in reftests.
|
||||
if let Some(ref pipeline) = details.pipeline {
|
||||
if let Some(root_layer) = self.find_pipeline_root_layer(pipeline.id) {
|
||||
if root_layer.bounds.borrow().size == Size2D::zero() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
details.paint_state == PaintState::Idle
|
||||
});
|
||||
}
|
||||
|
||||
fn has_paint_msg_tracking(&self) -> bool {
|
||||
|
|
|
@ -95,6 +95,8 @@ flaky_cpu == append_style_a.html append_style_b.html
|
|||
|
||||
== iframe/bg_color.html iframe/bg_color_ref.html
|
||||
== iframe/hide_and_show.html iframe/hide_and_show_ref.html
|
||||
== iframe/hide_layers1.html iframe/hide_layers_ref.html
|
||||
== iframe/hide_layers2.html iframe/hide_layers_ref.html
|
||||
== iframe/multiple_external.html iframe/multiple_external_ref.html
|
||||
== iframe/overflow.html iframe/overflow_ref.html
|
||||
== iframe/positioning_margin.html iframe/positioning_margin_ref.html
|
||||
|
@ -107,9 +109,6 @@ flaky_cpu == append_style_a.html append_style_b.html
|
|||
== iframe/simple_inline_width_height.html iframe/simple_inline_width_height_ref.html
|
||||
== iframe/simple_inline_width_percentage.html iframe/simple_inline_width_percentage_ref.html
|
||||
|
||||
# gw: race condition here caused by pipelines never painting when removed from document
|
||||
#== iframe/hide_layers1.html iframe/hide_layers_ref.html
|
||||
#== iframe/hide_layers2.html iframe/hide_layers_ref.html
|
||||
!= image_rendering_auto_a.html image_rendering_pixelated_a.html
|
||||
== image_rendering_pixelated_a.html image_rendering_pixelated_ref.html
|
||||
== img_block_display_a.html img_block_display_ref.html
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue