Store Compositor ReadyState per-pipeline

Instead of storing a single ReadyState, store one per pipeline and
track the earliest one.
This commit is contained in:
Bryan Bell 2014-08-28 13:56:01 -07:00 committed by Martin Robinson
parent a2ab6f9799
commit c182308350
5 changed files with 31 additions and 15 deletions

View file

@ -512,7 +512,8 @@ impl ScriptTask {
let mut layout_join_port = page.layout_join_port.deref().borrow_mut();
*layout_join_port = None;
}
self.compositor.set_ready_state(FinishedLoading);
self.compositor.set_ready_state(pipeline_id, FinishedLoading);
if page.pending_reflows.get() > 0 {
page.pending_reflows.set(0);
@ -616,7 +617,7 @@ impl ScriptTask {
let document = Document::new(&*window, Some(url.clone()), HTMLDocument, None).root();
window.deref().init_browser_context(&*document);
self.compositor.set_ready_state(Loading);
self.compositor.set_ready_state(pipeline_id, Loading);
// Parse HTML.
//
// Note: We can parse the next document in parallel with any previous documents.