diff --git a/gfx/webrender_bindings/revision.txt b/gfx/webrender_bindings/revision.txt index 45f69248d2d0..32c053cbf10b 100644 --- a/gfx/webrender_bindings/revision.txt +++ b/gfx/webrender_bindings/revision.txt @@ -1 +1 @@ -1ad9b79c3d19dec310077206002d09f5c7fb14cd +9a903a2c6912d2651faddadf81e76bf743657d72 diff --git a/gfx/wr/webrender/src/prim_store.rs b/gfx/wr/webrender/src/prim_store.rs index 38fe38246ae7..9c705c328f84 100644 --- a/gfx/wr/webrender/src/prim_store.rs +++ b/gfx/wr/webrender/src/prim_store.rs @@ -3717,3 +3717,22 @@ fn update_opacity_binding( binding.current } } + +#[test] +#[cfg(target_os = "linux")] +fn test_struct_sizes() { + // The sizes of these structures are critical for performance on a number of + // talos stress tests. If you get a failure here on CI, there's two possibilities: + // (a) You made a structure smaller than it currently is. Great work! Update the + // test expectations and move on. + // (b) You made a structure larger. This is not necessarily a problem, but should only + // be done with care, and after checking if talos performance regresses badly. + assert_eq!(mem::size_of::(), 256, "PrimitiveContainer size changed"); + assert_eq!(mem::size_of::(), 120, "PrimitiveInstance size changed"); + assert_eq!(mem::size_of::(), 16, "PrimitiveInstanceKind size changed"); + assert_eq!(mem::size_of::(), 176, "PrimitiveTemplate size changed"); + assert_eq!(mem::size_of::(), 112, "PrimitiveTemplateKind size changed"); + assert_eq!(mem::size_of::(), 152, "PrimitiveKey size changed"); + assert_eq!(mem::size_of::(), 112, "PrimitiveKeyKind size changed"); + assert_eq!(mem::size_of::(), 280, "Primitive size changed"); +}