Fixes a number of race conditions and reliability issues with reftests and compositor.

The basic idea is it's safe to output an image for reftest by testing:
 - That the compositor doesn't have any animations active.
 - That the compositor is not waiting on any outstanding paint messages to arrive.
 - That the script tasks are "idle" and therefore won't cause reflow.
    - This currently means page loaded, onload fired, reftest-wait not active, first reflow triggered.
    - It could easily be expanded to handle pending timers etc.
 - That the "epoch" that the layout tasks have last laid out after script went idle, is reflected by the compositor in all visible layers for that pipeline.
This commit is contained in:
Glenn Watson 2015-05-13 09:58:01 +10:00
parent b3b9deafa7
commit eec3fad93d
17 changed files with 363 additions and 390 deletions

View file

@ -92,16 +92,12 @@ impl CompositorEventListener for NullCompositor {
// we'll notice and think about whether it needs a response, like
// SetFrameTree.
Msg::CreateOrUpdateBaseLayer(..) |
Msg::CreateOrUpdateDescendantLayer(..) |
Msg::InitializeLayersForPipeline(..) |
Msg::SetLayerRect(..) |
Msg::AssignPaintedBuffers(..) |
Msg::ChangeReadyState(..) |
Msg::ChangePaintState(..) |
Msg::ChangeRunningAnimationsState(..) |
Msg::ScrollFragmentPoint(..) |
Msg::LoadComplete |
Msg::PaintMsgDiscarded(..) |
Msg::ScrollTimeout(..) |
Msg::RecompositeAfterScroll |
Msg::ChangePageTitle(..) |
@ -110,7 +106,8 @@ impl CompositorEventListener for NullCompositor {
Msg::SetCursor(..) |
Msg::ViewportConstrained(..) => {}
Msg::CreatePng(..) |
Msg::PaintTaskExited(..) => {}
Msg::PaintTaskExited(..) |
Msg::IsReadyToSaveImageReply(..) => {}
}
true
}