Implement basic Time To First Paint and First Contentful Paint PWMs

This commit is contained in:
Fernando Jiménez Moreno 2017-05-26 19:13:39 +02:00
parent 20a3b0236d
commit 892b30edca
20 changed files with 213 additions and 10 deletions

View file

@ -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"}

View file

@ -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;

View file

@ -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,
}