aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_traits/lib.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2019-03-25 14:10:44 -0400
committerJosh Matthews <josh@joshmatthews.net>2019-03-26 16:35:10 -0400
commit8b7244f0d1d259971547e76aa299f404b5baedfd (patch)
treedd8824d46d62408f925c5791fca7ea3d0b805882 /components/script_traits/lib.rs
parent90f67c11e5de39341b8b212a022ce997f9382eb3 (diff)
downloadservo-8b7244f0d1d259971547e76aa299f404b5baedfd.tar.gz
servo-8b7244f0d1d259971547e76aa299f404b5baedfd.zip
Support multiprocess in sampling profiler.
Diffstat (limited to 'components/script_traits/lib.rs')
-rw-r--r--components/script_traits/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs
index 724d76daede..49f4f055e63 100644
--- a/components/script_traits/lib.rs
+++ b/components/script_traits/lib.rs
@@ -51,6 +51,7 @@ use servo_url::ServoUrl;
use std::collections::HashMap;
use std::fmt;
use std::sync::Arc;
+use std::time::Duration;
use style_traits::CSSPixel;
use style_traits::SpeculativePainter;
use webrender_api::{
@@ -777,6 +778,10 @@ pub enum ConstellationMsg {
ForwardEvent(PipelineId, CompositorEvent),
/// Requesting a change to the onscreen cursor.
SetCursor(Cursor),
+ /// Enable the sampling profiler.
+ EnableProfiler(Duration),
+ /// Disable the sampling profiler.
+ DisableProfiler,
}
impl fmt::Debug for ConstellationMsg {
@@ -804,6 +809,8 @@ impl fmt::Debug for ConstellationMsg {
SelectBrowser(..) => "SelectBrowser",
ForwardEvent(..) => "ForwardEvent",
SetCursor(..) => "SetCursor",
+ EnableProfiler(..) => "EnableProfiler",
+ DisableProfiler => "DisableProfiler",
};
write!(formatter, "ConstellationMsg::{}", variant)
}