Skip to content

Commit 428d64d

Browse files
authored
Merge pull request #4873 from rmeno12/malloc-size-context-tree-deps
Add MallocSizeOf derives for servo memory usage measurement
2 parents 15318d6 + 17167f0 commit 428d64d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

webrender_api/src/display_item.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ pub struct RoundedRectClipDisplayItem {
278278

279279
/// The minimum and maximum allowable offset for a sticky frame in a single dimension.
280280
#[repr(C)]
281-
#[derive(Clone, Copy, Debug, Default, Deserialize, PartialEq, Serialize, PeekPoke)]
281+
#[derive(Clone, Copy, Debug, Default, Deserialize, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
282282
pub struct StickyOffsetBounds {
283283
/// The minimum offset for this frame, typically a negative value, which specifies how
284284
/// far in the negative direction the sticky frame can offset its contents in this
@@ -784,7 +784,7 @@ pub struct ReferenceFrameDescriptor {
784784
pub reference_frame: ReferenceFrame,
785785
}
786786

787-
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize, PeekPoke)]
787+
#[derive(Clone, Copy, Debug, Deserialize, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
788788
pub enum ReferenceFrameKind {
789789
/// A normal transform matrix, may contain perspective (the CSS transform property)
790790
Transform {
@@ -931,7 +931,7 @@ pub struct StackingContext {
931931
// IMPLICIT: filters: Vec<FilterOp>, filter_datas: Vec<FilterData>, filter_primitives: Vec<FilterPrimitive>
932932

933933
#[repr(u8)]
934-
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, PartialEq, Serialize, PeekPoke)]
934+
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
935935
pub enum TransformStyle {
936936
Flat = 0,
937937
Preserve3D = 1,
@@ -2219,7 +2219,7 @@ impl ClipId {
22192219
}
22202220

22212221
/// A reference to a spatial node defining item positioning.
2222-
#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, Hash, PartialEq, Serialize, PeekPoke)]
2222+
#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
22232223
pub struct SpatialId(pub usize, PipelineId);
22242224

22252225
const ROOT_REFERENCE_FRAME_SPATIAL_ID: usize = 0;
@@ -2250,7 +2250,7 @@ impl SpatialId {
22502250
///
22512251
/// When setting display lists with the `preserve_frame_state` this id is used to preserve scroll
22522252
/// offsets between different sets of SpatialNodes which are ScrollFrames.
2253-
#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, Hash, PartialEq, Serialize, PeekPoke)]
2253+
#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize, PeekPoke)]
22542254
#[repr(C)]
22552255
pub struct ExternalScrollId(pub u64, pub PipelineId);
22562256

webrender_api/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl Default for QualitySettings {
101101
/// This is mostly used as a synchronization mechanism to observe how/when particular pipeline
102102
/// updates propagate through WebRender and are applied at various stages.
103103
#[repr(C)]
104-
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
104+
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, Ord, PartialEq, PartialOrd, Serialize)]
105105
pub struct Epoch(pub u32);
106106

107107
impl Epoch {

0 commit comments

Comments
 (0)