mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
fixup! Simplify devtools frame marker notification. Record each frame tick based on a single message sent from the script task that ticked.
This commit is contained in:
parent
56475676e4
commit
aac53344b8
1 changed files with 3 additions and 4 deletions
|
@ -205,10 +205,9 @@ pub fn handle_drop_timeline_markers(page: &Rc<Page>,
|
||||||
pub fn handle_request_animation_frame(page: &Rc<Page>, id: PipelineId, actor_name: String) {
|
pub fn handle_request_animation_frame(page: &Rc<Page>, id: PipelineId, actor_name: String) {
|
||||||
let page = page.find(id).expect("There is no such page");
|
let page = page.find(id).expect("There is no such page");
|
||||||
let doc = page.document();
|
let doc = page.document();
|
||||||
let devtools_sender = page.window().devtools_chan();
|
let devtools_sender = page.window().devtools_chan().unwrap();
|
||||||
doc.r().request_animation_frame(box move |time| {
|
doc.r().request_animation_frame(box move |time| {
|
||||||
devtools_sender.unwrap()
|
let msg = ScriptToDevtoolsControlMsg::FramerateTick(actor_name, time);
|
||||||
.send(ScriptToDevtoolsControlMsg::FramerateTick(actor_name, time))
|
devtools_sender.send(msg).unwrap();
|
||||||
.unwrap();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue