diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-07-20 11:34:35 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-20 11:34:35 -0700 |
commit | eba573d774dd2ac07ec8d62f1ad8deffca4667a4 (patch) | |
tree | 4b648994ed5165109243af6f113e16432257ec87 /components/script_layout_interface | |
parent | a64f085ee0cc3d526dd7531ce132c32c2e10b3f5 (diff) | |
parent | 892b30edca806f5b96a7f7d2c65809939bc3344a (diff) | |
download | servo-eba573d774dd2ac07ec8d62f1ad8deffca4667a4.tar.gz servo-eba573d774dd2ac07ec8d62f1ad8deffca4667a4.zip |
Auto merge of #17256 - ferjm:ttfp, r=jdm
Implement basic Time To First Paint and First Contentful Paint PWMs
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17256)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script_layout_interface')
-rw-r--r-- | components/script_layout_interface/Cargo.toml | 1 | ||||
-rw-r--r-- | components/script_layout_interface/lib.rs | 1 | ||||
-rw-r--r-- | components/script_layout_interface/message.rs | 5 |
3 files changed, 7 insertions, 0 deletions
diff --git a/components/script_layout_interface/Cargo.toml b/components/script_layout_interface/Cargo.toml index a0db721012a..6e566488f65 100644 --- a/components/script_layout_interface/Cargo.toml +++ b/components/script_layout_interface/Cargo.toml @@ -22,6 +22,7 @@ html5ever = "0.18" ipc-channel = "0.8" libc = "0.2" log = "0.3.5" +metrics = {path = "../metrics"} msg = {path = "../msg"} net_traits = {path = "../net_traits"} profile_traits = {path = "../profile_traits"} diff --git a/components/script_layout_interface/lib.rs b/components/script_layout_interface/lib.rs index 210bb1a5c11..e3e956096bb 100644 --- a/components/script_layout_interface/lib.rs +++ b/components/script_layout_interface/lib.rs @@ -24,6 +24,7 @@ extern crate ipc_channel; extern crate libc; #[macro_use] extern crate log; +extern crate metrics; extern crate msg; extern crate net_traits; extern crate profile_traits; diff --git a/components/script_layout_interface/message.rs b/components/script_layout_interface/message.rs index bd68eaec7a6..9c8a3fbbd47 100644 --- a/components/script_layout_interface/message.rs +++ b/components/script_layout_interface/message.rs @@ -7,6 +7,7 @@ use app_units::Au; use euclid::{Point2D, Rect}; use gfx_traits::Epoch; use ipc_channel::ipc::{IpcReceiver, IpcSender}; +use metrics::PaintTimeMetrics; use msg::constellation_msg::PipelineId; use net_traits::image_cache::ImageCache; use profile_traits::mem::ReportsChan; @@ -89,6 +90,9 @@ pub enum Msg { /// Tells layout that script has added some paint worklet modules. RegisterPaint(Atom, Vec<Atom>, Arc<Painter>), + + /// Send to layout the precise time when the navigation started. + SetNavigationStart(f64), } @@ -158,4 +162,5 @@ pub struct NewLayoutThreadInfo { pub image_cache: Arc<ImageCache>, pub content_process_shutdown_chan: Option<IpcSender<()>>, pub layout_threads: usize, + pub paint_time_metrics: PaintTimeMetrics, } |