diff options
author | atbrakhi <atbrakhi@igalia.com> | 2024-09-13 07:51:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-13 05:51:19 +0000 |
commit | 497df024b185feb7370d3f9ebca10e18e7585099 (patch) | |
tree | b64cae11866ee03e5fa4e3afb76568d6bd2e855e /components/shared | |
parent | 03abf7751aead3d42f5a4e2207567dd3012cee96 (diff) | |
download | servo-497df024b185feb7370d3f9ebca10e18e7585099.tar.gz servo-497df024b185feb7370d3f9ebca10e18e7585099.zip |
Trace more functions by adding perfetto tracing events (#33417)
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Diffstat (limited to 'components/shared')
-rw-r--r-- | components/shared/canvas/canvas.rs | 2 | ||||
-rw-r--r-- | components/shared/script/lib.rs | 2 | ||||
-rw-r--r-- | components/shared/script_layout/lib.rs | 6 |
3 files changed, 7 insertions, 3 deletions
diff --git a/components/shared/canvas/canvas.rs b/components/shared/canvas/canvas.rs index d1f59ebea3b..3be14565603 100644 --- a/components/shared/canvas/canvas.rs +++ b/components/shared/canvas/canvas.rs @@ -23,7 +23,7 @@ pub enum FillRule { #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize)] pub struct CanvasId(pub u64); -#[derive(Deserialize, Serialize)] +#[derive(Debug, Deserialize, Serialize)] pub enum CanvasMsg { Canvas2d(Canvas2dMsg, CanvasId), FromLayout(FromLayoutMsg, CanvasId), diff --git a/components/shared/script/lib.rs b/components/shared/script/lib.rs index 0262cb8f785..1ab9e518731 100644 --- a/components/shared/script/lib.rs +++ b/components/shared/script/lib.rs @@ -732,7 +732,7 @@ pub struct IFrameLoadInfoWithData { } bitflags! { - #[derive(Default, Deserialize, Serialize)] + #[derive(Debug, Default, Deserialize, Serialize)] /// Specifies if rAF should be triggered and/or CSS Animations and Transitions. pub struct AnimationTickType: u8 { /// Trigger a call to requestAnimationFrame. diff --git a/components/shared/script_layout/lib.rs b/components/shared/script_layout/lib.rs index c5e3bf89d60..3969cc332fb 100644 --- a/components/shared/script_layout/lib.rs +++ b/components/shared/script_layout/lib.rs @@ -140,6 +140,7 @@ pub struct TrustedNodeAddress(pub *const c_void); unsafe impl Send for TrustedNodeAddress {} /// Whether the pending image needs to be fetched or is waiting on an existing fetch. +#[derive(Debug)] pub enum PendingImageState { Unrequested(ServoUrl), PendingResponse, @@ -148,6 +149,7 @@ pub enum PendingImageState { /// The data associated with an image that is not yet present in the image cache. /// Used by the script thread to hold on to DOM elements that need to be repainted /// when an image fetch is complete. +#[derive(Debug)] pub struct PendingImage { pub state: PendingImageState, pub node: UntrustedNodeAddress, @@ -365,19 +367,21 @@ impl ReflowGoal { } /// Information needed for a reflow. +#[derive(Debug)] pub struct Reflow { /// A clipping rectangle for the page, an enlarged rectangle containing the viewport. pub page_clip_rect: Rect<Au>, } /// Information derived from a layout pass that needs to be returned to the script thread. -#[derive(Default)] +#[derive(Debug, Default)] pub struct ReflowComplete { /// The list of images that were encountered that are in progress. pub pending_images: Vec<PendingImage>, } /// Information needed for a script-initiated reflow. +#[derive(Debug)] pub struct ScriptReflow { /// General reflow data. pub reflow_info: Reflow, |