mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
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:
parent
a2ab6f9799
commit
c182308350
5 changed files with 31 additions and 15 deletions
|
@ -328,7 +328,7 @@ impl Page {
|
|||
self.join_layout();
|
||||
|
||||
// Tell the user that we're performing layout.
|
||||
compositor.set_ready_state(PerformingLayout);
|
||||
compositor.set_ready_state(self.id, PerformingLayout);
|
||||
|
||||
// Layout will let us know when it's done.
|
||||
let (join_chan, join_port) = channel();
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue