aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_traits
diff options
context:
space:
mode:
Diffstat (limited to 'components/script_traits')
-rw-r--r--components/script_traits/Cargo.toml1
-rw-r--r--components/script_traits/lib.rs2
-rw-r--r--components/script_traits/script_msg.rs4
3 files changed, 6 insertions, 1 deletions
diff --git a/components/script_traits/Cargo.toml b/components/script_traits/Cargo.toml
index 2c083b2773c..3e957cf29ae 100644
--- a/components/script_traits/Cargo.toml
+++ b/components/script_traits/Cargo.toml
@@ -22,7 +22,6 @@ hyper = "0.10"
hyper_serde = "0.7"
ipc-channel = "0.8"
libc = "0.2"
-metrics = {path = "../metrics"}
msg = {path = "../msg"}
net_traits = {path = "../net_traits"}
profile_traits = {path = "../profile_traits"}
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs
index 4a197e759ff..3b5a47a3ef7 100644
--- a/components/script_traits/lib.rs
+++ b/components/script_traits/lib.rs
@@ -124,6 +124,8 @@ pub enum LayoutControlMsg {
/// Requests the current load state of Web fonts. `true` is returned if fonts are still loading
/// and `false` is returned if all fonts have loaded.
GetWebFontLoadState(IpcSender<bool>),
+ /// Send the paint time for a specific epoch to the layout thread.
+ PaintMetric(Epoch, f64),
}
/// can be passed to `LoadUrl` to load a page with GET/POST
diff --git a/components/script_traits/script_msg.rs b/components/script_traits/script_msg.rs
index 156f85a2be7..2d449e986a4 100644
--- a/components/script_traits/script_msg.rs
+++ b/components/script_traits/script_msg.rs
@@ -15,6 +15,7 @@ use WorkerScriptLoadOrigin;
use canvas_traits::canvas::CanvasMsg;
use devtools_traits::{ScriptToDevtoolsControlMsg, WorkerId};
use euclid::{Point2D, Size2D, TypedSize2D};
+use gfx_traits::Epoch;
use ipc_channel::ipc::IpcSender;
use msg::constellation_msg::{BrowsingContextId, FrameType, PipelineId, TraversalDirection};
use msg::constellation_msg::{Key, KeyModifiers, KeyState};
@@ -35,6 +36,9 @@ pub enum LayoutMsg {
ChangeRunningAnimationsState(PipelineId, AnimationState),
/// Inform the constellation of the size of the iframe's viewport.
IFrameSizes(Vec<(BrowsingContextId, TypedSize2D<f32, CSSPixel>)>),
+ /// Requests that the constellation inform the compositor that it needs to record
+ /// the time when the frame with the given ID (epoch) is painted.
+ PendingPaintMetric(PipelineId, Epoch),
/// Requests that the constellation inform the compositor of the a cursor change.
SetCursor(Cursor),
/// Notifies the constellation that the viewport has been constrained in some manner