diff options
author | Xidorn Quan <me@upsuper.org> | 2018-03-15 10:46:27 +1100 |
---|---|---|
committer | Xidorn Quan <me@upsuper.org> | 2018-03-15 11:57:52 +1100 |
commit | 368fb574f8ea08dba4ef9cb55bb7690a42d8024c (patch) | |
tree | c9d554859b3e74a851b2118d2e54435d2c593b0f /components/style/gecko/generated/structs.rs | |
parent | d700fa16a16e2815acc17170072335172048369c (diff) | |
download | servo-368fb574f8ea08dba4ef9cb55bb7690a42d8024c.tar.gz servo-368fb574f8ea08dba4ef9cb55bb7690a42d8024c.zip |
Have servo report traversal statistics to gecko.
Diffstat (limited to 'components/style/gecko/generated/structs.rs')
-rw-r--r-- | components/style/gecko/generated/structs.rs | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/components/style/gecko/generated/structs.rs b/components/style/gecko/generated/structs.rs index c20b03d33ca..5374f420c7d 100644 --- a/components/style/gecko/generated/structs.rs +++ b/components/style/gecko/generated/structs.rs @@ -13634,6 +13634,107 @@ pub mod root { ); } #[repr(C)] + #[derive(Debug, Copy)] + pub struct ServoTraversalStatistics { + pub mElementsTraversed: u32, + pub mElementsStyled: u32, + pub mElementsMatched: u32, + pub mStylesShared: u32, + pub mStylesReused: u32, + } + extern "C" { + #[link_name = "\u{1}_ZN7mozilla24ServoTraversalStatistics7sActiveE"] + pub static mut ServoTraversalStatistics_sActive: bool; + } + extern "C" { + #[link_name = "\u{1}_ZN7mozilla24ServoTraversalStatistics10sSingletonE"] + pub static mut ServoTraversalStatistics_sSingleton: + root::mozilla::ServoTraversalStatistics; + } + #[test] + fn bindgen_test_layout_ServoTraversalStatistics() { + assert_eq!( + ::std::mem::size_of::<ServoTraversalStatistics>(), + 20usize, + concat!("Size of: ", stringify!(ServoTraversalStatistics)) + ); + assert_eq!( + ::std::mem::align_of::<ServoTraversalStatistics>(), + 4usize, + concat!("Alignment of ", stringify!(ServoTraversalStatistics)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ServoTraversalStatistics>())).mElementsTraversed + as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ServoTraversalStatistics), + "::", + stringify!(mElementsTraversed) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ServoTraversalStatistics>())).mElementsStyled as *const _ + as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ServoTraversalStatistics), + "::", + stringify!(mElementsStyled) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ServoTraversalStatistics>())).mElementsMatched + as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ServoTraversalStatistics), + "::", + stringify!(mElementsMatched) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ServoTraversalStatistics>())).mStylesShared as *const _ + as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(ServoTraversalStatistics), + "::", + stringify!(mStylesShared) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<ServoTraversalStatistics>())).mStylesReused as *const _ + as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(ServoTraversalStatistics), + "::", + stringify!(mStylesReused) + ) + ); + } + impl Clone for ServoTraversalStatistics { + fn clone(&self) -> Self { + *self + } + } + #[repr(C)] #[derive(Debug)] pub struct CSSFontFaceDescriptors { pub mFamily: root::nsCSSValue, |