Bug 1519639 - Update cbindgen config and generated FFI header. r=jrmuizel
authorEmilio Cobos Álvarez <emilio@crisal.io>
Sat, 12 Jan 2019 16:49:39 +0100
changeset 453672 d884f9b54dc622c7e499633aec2180c236ea5ed5
parent 453671 be569ca36f5f3a9643702d1974ebc8dd50770359
child 453673 4cbb6dfb13e0fc40000ea194f3d40a0891e12f32
push id35367
push useraciure@mozilla.com
push dateSun, 13 Jan 2019 21:36:46 +0000
treeherdermozilla-central@63b0062fba03 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1519639
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1519639 - Update cbindgen config and generated FFI header. r=jrmuizel Differential Revision: https://phabricator.services.mozilla.com/D16391
gfx/webrender_bindings/cbindgen.toml
gfx/webrender_bindings/webrender_ffi_generated.h
--- a/gfx/webrender_bindings/cbindgen.toml
+++ b/gfx/webrender_bindings/cbindgen.toml
@@ -15,18 +15,17 @@ language = "C++"
 namespaces = ["mozilla", "wr"]
 
 [export]
 # Skip constants because we don't have any
 item_types = ["globals", "enums", "structs", "unions", "typedefs", "opaque", "functions"]
 
 [parse]
 parse_deps = true
-include = ["log", "webrender", "webrender_api"]
-expand = ["euclid"]
+include = ["log", "euclid", "webrender", "webrender_api"]
 
 [fn]
 prefix = "WR_INLINE"
 postfix = "WR_FUNC"
 args = "Vertical"
 rename_args = "GeckoCase"
 
 [struct]
--- a/gfx/webrender_bindings/webrender_ffi_generated.h
+++ b/gfx/webrender_bindings/webrender_ffi_generated.h
@@ -524,16 +524,17 @@ struct MemoryReport {
   uintptr_t gpu_cache_textures;
   uintptr_t vertex_data_textures;
   uintptr_t render_target_textures;
   uintptr_t texture_cache_textures;
   uintptr_t depth_target_textures;
   uintptr_t swap_chain;
 };
 
+/// A 2d size tagged with a unit.
 template<typename T, typename U>
 struct TypedSize2D {
   T width;
   T height;
 
   bool operator==(const TypedSize2D& aOther) const {
     return width == aOther.width &&
            height == aOther.height;
@@ -739,16 +740,18 @@ struct TypedVector2D {
   bool operator==(const TypedVector2D& aOther) const {
     return x == aOther.x &&
            y == aOther.y;
   }
 };
 
 using LayoutVector2D = TypedVector2D<float, LayoutPixel>;
 
+/// A group of side offsets, which correspond to top/left/bottom/right for borders, padding,
+/// and margins in CSS, optionally tagged with a unit.
 template<typename T, typename U>
 struct TypedSideOffsets2D {
   T top;
   T right;
   T bottom;
   T left;
 
   bool operator==(const TypedSideOffsets2D& aOther) const {