aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/gecko/generated/structs_debug.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2017-08-02 16:42:09 +1000
committerNicholas Nethercote <nnethercote@mozilla.com>2017-08-03 09:15:38 +1000
commit526e9691f801b0819e6d86aed008dae74f5541e9 (patch)
tree6a17c3f1afa0de2b7749b6e7ef685c489c9c4d13 /components/style/gecko/generated/structs_debug.rs
parente07beacd4db4805beb6fd063bf5ccc806f90bf15 (diff)
downloadservo-526e9691f801b0819e6d86aed008dae74f5541e9.tar.gz
servo-526e9691f801b0819e6d86aed008dae74f5541e9.zip
stylo: Measure Elements and ComputedValues.
The patch provides FFI access to Gecko's SeenPtrs type from Rust, in order to record what has already been measured when measuring Arcs. (The SeenPtrs must be initialized on the Gecko side because the same table is reused for measuring all Elements within a window, because Elements can share ComputedValues.) I have confirmed with DMD that this is working correctly. The patch also introduces MallocSizeOfRepeats, which is like MallocSizeOf but takes a SizeOfState, which holds a SeenPtrs table.
Diffstat (limited to 'components/style/gecko/generated/structs_debug.rs')
-rw-r--r--components/style/gecko/generated/structs_debug.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/components/style/gecko/generated/structs_debug.rs b/components/style/gecko/generated/structs_debug.rs
index ac9ad2686ce..7d6eed0e140 100644
--- a/components/style/gecko/generated/structs_debug.rs
+++ b/components/style/gecko/generated/structs_debug.rs
@@ -6024,6 +6024,21 @@ pub mod root {
MAX = 29,
}
#[repr(C)]
+ #[derive(Debug, Copy)]
+ pub struct SeenPtrs {
+ pub _bindgen_opaque_blob: [u64; 6usize],
+ }
+ #[test]
+ fn bindgen_test_layout_SeenPtrs() {
+ assert_eq!(::std::mem::size_of::<SeenPtrs>() , 48usize , concat !
+ ( "Size of: " , stringify ! ( SeenPtrs ) ));
+ assert_eq! (::std::mem::align_of::<SeenPtrs>() , 8usize , concat !
+ ( "Alignment of " , stringify ! ( SeenPtrs ) ));
+ }
+ impl Clone for SeenPtrs {
+ fn clone(&self) -> Self { *self }
+ }
+ #[repr(C)]
#[derive(Debug)]
pub struct URLExtraData {
pub mRefCnt: root::mozilla::ThreadSafeAutoRefCnt,