diff options
author | Glenn Watson <gw@intuitionlibrary.com> | 2015-05-13 09:58:01 +1000 |
---|---|---|
committer | Glenn Watson <gw@intuitionlibrary.com> | 2015-05-14 09:35:53 +1000 |
commit | eec3fad93da44724a661520e569fb7471c1b4f35 (patch) | |
tree | 5d1ffa8b2069af440a29127644fbe01dd6661643 /components/script/layout_interface.rs | |
parent | b3b9deafa7ed87bd0649849f3aa729f21c4ff45d (diff) | |
download | servo-eec3fad93da44724a661520e569fb7471c1b4f35.tar.gz servo-eec3fad93da44724a661520e569fb7471c1b4f35.zip |
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.
Diffstat (limited to 'components/script/layout_interface.rs')
-rw-r--r-- | components/script/layout_interface.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/components/script/layout_interface.rs b/components/script/layout_interface.rs index 6fde5c4312f..ad474a0daed 100644 --- a/components/script/layout_interface.rs +++ b/components/script/layout_interface.rs @@ -12,6 +12,7 @@ use geom::point::Point2D; use geom::rect::Rect; use libc::uintptr_t; use msg::constellation_msg::{PipelineExitType, WindowSizeData}; +use msg::compositor_msg::Epoch; use net_traits::PendingAsyncLoad; use profile_traits::mem::{Reporter, ReportsChan}; use script_traits::{ScriptControlChan, OpaqueScriptLayoutChannel, UntrustedNodeAddress}; @@ -63,6 +64,9 @@ pub enum Msg { /// Requests that the layout task immediately shut down. There must be no more nodes left after /// this, or layout will crash. ExitNow(PipelineExitType), + + /// Get the last epoch counter for this layout task. + GetCurrentEpoch(Sender<Epoch>) } /// Synchronous messages that script can send to layout. |