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:
Josh Matthews 2015-08-12 09:05:05 -04:00
parent 56475676e4
commit aac53344b8

View file

@ -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();
}); });
} }