mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
added time to interactive metrics, refactored metrics to use traits
changed task macro to take pipeline info
This commit is contained in:
parent
347176df25
commit
2ffbe53989
26 changed files with 730 additions and 138 deletions
|
@ -304,6 +304,11 @@ impl Window {
|
|||
}
|
||||
}
|
||||
|
||||
/// Get a sender to the time profiler thread.
|
||||
pub fn time_profiler_chan(&self) -> &TimeProfilerChan {
|
||||
self.globalscope.time_profiler_chan()
|
||||
}
|
||||
|
||||
pub fn origin(&self) -> &MutableOrigin {
|
||||
self.globalscope.origin()
|
||||
}
|
||||
|
@ -1040,6 +1045,10 @@ impl Window {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn get_navigation_start(&self) -> f64 {
|
||||
self.navigation_start_precise.get()
|
||||
}
|
||||
|
||||
/// Cancels all the tasks associated with that window.
|
||||
///
|
||||
/// This sets the current `ignore_further_async_events` sentinel value to
|
||||
|
@ -1854,6 +1863,10 @@ impl Window {
|
|||
WindowBinding::Wrap(runtime.cx(), win)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn pipeline_id(&self) -> Option<PipelineId> {
|
||||
Some(self.upcast::<GlobalScope>().pipeline_id())
|
||||
}
|
||||
}
|
||||
|
||||
fn should_move_clip_rect(clip_rect: Rect<Au>, new_viewport: Rect<f32>) -> bool {
|
||||
|
@ -1962,6 +1975,7 @@ impl Window {
|
|||
let _ = self.script_chan.send(CommonScriptMsg::Task(
|
||||
ScriptThreadEventCategory::DomEvent,
|
||||
Box::new(self.task_canceller().wrap_task(task)),
|
||||
self.pipeline_id()
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue