mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +01:00
Move idle message sending to Window::update_the_rendering
This commit is contained in:
parent
851195c3ce
commit
f5472c1295
2 changed files with 6 additions and 14 deletions
|
@ -3723,7 +3723,12 @@ impl Document {
|
||||||
receiver.recv().unwrap();
|
receiver.recv().unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
self.window().reflow(ReflowGoal::UpdateTheRendering, can_gc)
|
let result = self.window().reflow(ReflowGoal::UpdateTheRendering, can_gc);
|
||||||
|
|
||||||
|
self.window()
|
||||||
|
.maybe_send_idle_document_state_to_constellation();
|
||||||
|
|
||||||
|
result
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn id_map(&self) -> Ref<HashMapTracedValues<Atom, Vec<Dom<Element>>>> {
|
pub(crate) fn id_map(&self) -> Ref<HashMapTracedValues<Atom, Vec<Dom<Element>>>> {
|
||||||
|
|
|
@ -1400,18 +1400,6 @@ impl ScriptThread {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn maybe_send_idle_document_state_to_constellation(&self) {
|
|
||||||
if !opts::get().wait_for_stable_image {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (_, document) in self.documents.borrow().iter() {
|
|
||||||
document
|
|
||||||
.window()
|
|
||||||
.maybe_send_idle_document_state_to_constellation();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn maybe_schedule_rendering_opportunity_after_ipc_message(&self, can_gc: CanGc) {
|
fn maybe_schedule_rendering_opportunity_after_ipc_message(&self, can_gc: CanGc) {
|
||||||
if self.has_pending_animation_tick.load(Ordering::Relaxed) {
|
if self.has_pending_animation_tick.load(Ordering::Relaxed) {
|
||||||
self.update_the_rendering(can_gc);
|
self.update_the_rendering(can_gc);
|
||||||
|
@ -1659,7 +1647,6 @@ impl ScriptThread {
|
||||||
}
|
}
|
||||||
|
|
||||||
self.maybe_schedule_rendering_opportunity_after_ipc_message(can_gc);
|
self.maybe_schedule_rendering_opportunity_after_ipc_message(can_gc);
|
||||||
self.maybe_send_idle_document_state_to_constellation();
|
|
||||||
|
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue