mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Add a sampling profiler and a script to generate profiles for use with Gecko tooling.
This commit is contained in:
parent
db7bb2a510
commit
90f67c11e5
13 changed files with 379 additions and 28 deletions
|
@ -16,6 +16,7 @@ use servo_url::ServoUrl;
|
|||
use std::fmt::{Debug, Error, Formatter};
|
||||
#[cfg(feature = "gl")]
|
||||
use std::rc::Rc;
|
||||
use std::time::Duration;
|
||||
use style_traits::DevicePixel;
|
||||
use webrender_api::{DeviceIntPoint, DeviceIntRect, DeviceIntSize, DevicePoint, ScrollLocation};
|
||||
use webvr::VRServiceManager;
|
||||
|
@ -91,6 +92,8 @@ pub enum WindowEvent {
|
|||
ToggleWebRenderDebug(WebRenderDebugOption),
|
||||
/// Capture current WebRender
|
||||
CaptureWebRender,
|
||||
/// Toggle sampling profiler with the given sampling rate
|
||||
ToggleSamplingProfiler(Duration),
|
||||
}
|
||||
|
||||
impl Debug for WindowEvent {
|
||||
|
@ -118,6 +121,7 @@ impl Debug for WindowEvent {
|
|||
WindowEvent::SelectBrowser(..) => write!(f, "SelectBrowser"),
|
||||
WindowEvent::ToggleWebRenderDebug(..) => write!(f, "ToggleWebRenderDebug"),
|
||||
WindowEvent::CaptureWebRender => write!(f, "CaptureWebRender"),
|
||||
WindowEvent::ToggleSamplingProfiler(..) => write!(f, "ToggleSamplingProfiler"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue