mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1383714 - Update to cbindgen 0.1.19. r=kats
MozReview-Commit-ID: FdtZ9Pw0Z2A --HG-- extra : rebase_source : 1cabc3fcc16ccf20a8d111389ccbbf518c42f32e
This commit is contained in:
parent
f3ac359f5b
commit
11bda66c5d
@ -22,8 +22,15 @@ namespace mozilla {
|
||||
|
||||
namespace wr {
|
||||
struct ColorF;
|
||||
struct LayoutRect;
|
||||
struct LayoutSize;
|
||||
|
||||
struct TypedSize2D_f32__LayerPixel;
|
||||
typedef TypedSize2D_f32__LayerPixel LayerSize;
|
||||
typedef LayerSize LayoutSize;
|
||||
|
||||
struct TypedRect_f32__LayerPixel;
|
||||
typedef TypedRect_f32__LayerPixel LayerRect;
|
||||
typedef LayerRect LayoutRect;
|
||||
|
||||
} // namespace wr
|
||||
|
||||
namespace gfx {
|
||||
|
@ -209,7 +209,7 @@ WebRenderAPI::GenerateFrame(const nsTArray<wr::WrOpacityProperty>& aOpacityArray
|
||||
void
|
||||
WebRenderAPI::SetRootDisplayList(gfx::Color aBgColor,
|
||||
Epoch aEpoch,
|
||||
LayerSize aViewportSize,
|
||||
mozilla::LayerSize aViewportSize,
|
||||
wr::WrPipelineId pipeline_id,
|
||||
const LayoutSize& content_size,
|
||||
wr::BuiltDisplayListDescriptor dl_descriptor,
|
||||
|
@ -59,7 +59,7 @@ public:
|
||||
void SetWindowParameters(LayoutDeviceIntSize size);
|
||||
void SetRootDisplayList(gfx::Color aBgColor,
|
||||
Epoch aEpoch,
|
||||
LayerSize aViewportSize,
|
||||
mozilla::LayerSize aViewportSize,
|
||||
wr::WrPipelineId pipeline_id,
|
||||
const wr::LayoutSize& content_size,
|
||||
wr::BuiltDisplayListDescriptor dl_descriptor,
|
||||
@ -143,7 +143,7 @@ public:
|
||||
|
||||
~DisplayListBuilder();
|
||||
|
||||
void Begin(const LayerIntSize& aSize);
|
||||
void Begin(const mozilla::LayerIntSize& aSize);
|
||||
|
||||
void End();
|
||||
void Finalize(wr::LayoutSize& aOutContentSize,
|
||||
|
@ -342,7 +342,7 @@ static inline wr::BorderSide ToBorderSide(const gfx::Color& color, const uint8_t
|
||||
return bs;
|
||||
}
|
||||
|
||||
static inline wr::BorderRadius ToUniformBorderRadius(const LayerSize& aSize)
|
||||
static inline wr::BorderRadius ToUniformBorderRadius(const mozilla::LayerSize& aSize)
|
||||
{
|
||||
wr::BorderRadius br;
|
||||
br.top_left = ToLayoutSize(aSize);
|
||||
@ -352,8 +352,8 @@ static inline wr::BorderRadius ToUniformBorderRadius(const LayerSize& aSize)
|
||||
return br;
|
||||
}
|
||||
|
||||
static inline wr::BorderRadius ToBorderRadius(const LayerSize& topLeft, const LayerSize& topRight,
|
||||
const LayerSize& bottomLeft, const LayerSize& bottomRight)
|
||||
static inline wr::BorderRadius ToBorderRadius(const mozilla::LayerSize& topLeft, const mozilla::LayerSize& topRight,
|
||||
const mozilla::LayerSize& bottomLeft, const mozilla::LayerSize& bottomRight)
|
||||
{
|
||||
wr::BorderRadius br;
|
||||
br.top_left = ToLayoutSize(topLeft);
|
||||
@ -440,7 +440,7 @@ static inline wr::WrOpacityProperty ToWrOpacityProperty(uint64_t id, const float
|
||||
}
|
||||
|
||||
static inline wr::WrComplexClipRegion ToWrComplexClipRegion(const wr::LayoutRect& rect,
|
||||
const LayerSize& size)
|
||||
const mozilla::LayerSize& size)
|
||||
{
|
||||
wr::WrComplexClipRegion complex_clip;
|
||||
complex_clip.rect = rect;
|
||||
@ -450,7 +450,7 @@ static inline wr::WrComplexClipRegion ToWrComplexClipRegion(const wr::LayoutRect
|
||||
|
||||
template<class T>
|
||||
static inline wr::WrComplexClipRegion ToWrComplexClipRegion(const gfx::RectTyped<T>& rect,
|
||||
const LayerSize& size)
|
||||
const mozilla::LayerSize& size)
|
||||
{
|
||||
return ToWrComplexClipRegion(wr::ToLayoutRect(rect), size);
|
||||
}
|
||||
@ -488,19 +488,19 @@ static inline wr::WrExternalImage NativeTextureToWrExternalImage(uint32_t aHandl
|
||||
};
|
||||
}
|
||||
|
||||
struct VecU8 {
|
||||
struct Vec_u8 {
|
||||
wr::WrVecU8 inner;
|
||||
VecU8() {
|
||||
Vec_u8() {
|
||||
SetEmpty();
|
||||
}
|
||||
VecU8(VecU8&) = delete;
|
||||
VecU8(VecU8&& src) {
|
||||
Vec_u8(Vec_u8&) = delete;
|
||||
Vec_u8(Vec_u8&& src) {
|
||||
inner = src.inner;
|
||||
src.SetEmpty();
|
||||
}
|
||||
|
||||
VecU8&
|
||||
operator=(VecU8&& src) {
|
||||
Vec_u8&
|
||||
operator=(Vec_u8&& src) {
|
||||
inner = src.inner;
|
||||
src.SetEmpty();
|
||||
return *this;
|
||||
@ -520,7 +520,7 @@ struct VecU8 {
|
||||
inner.length = 0;
|
||||
}
|
||||
|
||||
~VecU8() {
|
||||
~Vec_u8() {
|
||||
if (inner.data) {
|
||||
wr_vec_u8_free(inner);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* Generated with cbindgen:0.1.18 */
|
||||
/* Generated with cbindgen:0.1.19 */
|
||||
|
||||
/* DO NOT MODIFY THIS MANUALLY! This file was generated using cbindgen.
|
||||
* To generate this file:
|
||||
@ -49,6 +49,15 @@ enum class ExtendMode : uint32_t {
|
||||
Sentinel /* this must be last for serialization purposes. */
|
||||
};
|
||||
|
||||
enum class ExternalImageType : uint32_t {
|
||||
Texture2DHandle = 0,
|
||||
TextureRectHandle = 1,
|
||||
TextureExternalHandle = 2,
|
||||
ExternalBuffer = 3,
|
||||
|
||||
Sentinel /* this must be last for serialization purposes. */
|
||||
};
|
||||
|
||||
enum class ImageFormat : uint32_t {
|
||||
Invalid = 0,
|
||||
A8 = 1,
|
||||
@ -105,15 +114,6 @@ enum class TransformStyle : uint32_t {
|
||||
Sentinel /* this must be last for serialization purposes. */
|
||||
};
|
||||
|
||||
enum class WrExternalImageBufferType : uint32_t {
|
||||
Texture2DHandle = 0,
|
||||
TextureRectHandle = 1,
|
||||
TextureExternalHandle = 2,
|
||||
ExternalBuffer = 3,
|
||||
|
||||
Sentinel /* this must be last for serialization purposes. */
|
||||
};
|
||||
|
||||
enum class WrExternalImageType : uint32_t {
|
||||
NativeTexture = 0,
|
||||
RawData = 1,
|
||||
@ -135,14 +135,14 @@ enum class WrFilterOpType : uint32_t {
|
||||
Sentinel /* this must be last for serialization purposes. */
|
||||
};
|
||||
|
||||
enum class WrYuvColorSpace : uint32_t {
|
||||
enum class YuvColorSpace : uint32_t {
|
||||
Rec601 = 0,
|
||||
Rec709 = 1,
|
||||
|
||||
Sentinel /* this must be last for serialization purposes. */
|
||||
};
|
||||
|
||||
struct ArcVecU8;
|
||||
struct Arc_VecU8;
|
||||
|
||||
struct LayerPixel;
|
||||
|
||||
@ -150,7 +150,7 @@ struct RenderApi;
|
||||
|
||||
struct Renderer;
|
||||
|
||||
struct VecU8;
|
||||
struct Vec_u8;
|
||||
|
||||
struct WrRenderedEpochs;
|
||||
|
||||
@ -158,16 +158,22 @@ struct WrState;
|
||||
|
||||
struct WrThreadPool;
|
||||
|
||||
struct WrImageKey {
|
||||
typedef Vec_u8 VecU8;
|
||||
|
||||
typedef Arc_VecU8 ArcVecU8;
|
||||
|
||||
struct ImageKey {
|
||||
uint32_t mNamespace;
|
||||
uint32_t mHandle;
|
||||
|
||||
bool operator==(const WrImageKey& aOther) const {
|
||||
bool operator==(const ImageKey& aOther) const {
|
||||
return mNamespace == aOther.mNamespace &&
|
||||
mHandle == aOther.mHandle;
|
||||
}
|
||||
};
|
||||
|
||||
typedef ImageKey WrImageKey;
|
||||
|
||||
struct WrImageDescriptor {
|
||||
ImageFormat format;
|
||||
uint32_t width;
|
||||
@ -202,50 +208,62 @@ struct WrExternalImageId {
|
||||
}
|
||||
};
|
||||
|
||||
struct WrFontKey {
|
||||
typedef ExternalImageType WrExternalImageBufferType;
|
||||
|
||||
struct FontKey {
|
||||
uint32_t mNamespace;
|
||||
uint32_t mHandle;
|
||||
|
||||
bool operator==(const WrFontKey& aOther) const {
|
||||
bool operator==(const FontKey& aOther) const {
|
||||
return mNamespace == aOther.mNamespace &&
|
||||
mHandle == aOther.mHandle;
|
||||
}
|
||||
};
|
||||
|
||||
struct WrEpoch {
|
||||
typedef FontKey WrFontKey;
|
||||
|
||||
struct Epoch {
|
||||
uint32_t mHandle;
|
||||
|
||||
bool operator==(const WrEpoch& aOther) const {
|
||||
bool operator==(const Epoch& aOther) const {
|
||||
return mHandle == aOther.mHandle;
|
||||
}
|
||||
bool operator<(const WrEpoch& aOther) const {
|
||||
bool operator<(const Epoch& aOther) const {
|
||||
return mHandle < aOther.mHandle;
|
||||
}
|
||||
bool operator<=(const WrEpoch& aOther) const {
|
||||
bool operator<=(const Epoch& aOther) const {
|
||||
return mHandle <= aOther.mHandle;
|
||||
}
|
||||
};
|
||||
|
||||
struct WrPipelineId {
|
||||
typedef Epoch WrEpoch;
|
||||
|
||||
struct PipelineId {
|
||||
uint32_t mNamespace;
|
||||
uint32_t mHandle;
|
||||
|
||||
bool operator==(const WrPipelineId& aOther) const {
|
||||
bool operator==(const PipelineId& aOther) const {
|
||||
return mNamespace == aOther.mNamespace &&
|
||||
mHandle == aOther.mHandle;
|
||||
}
|
||||
};
|
||||
|
||||
struct LayoutSize {
|
||||
typedef PipelineId WrPipelineId;
|
||||
|
||||
struct TypedSize2D_f32__LayerPixel {
|
||||
float width;
|
||||
float height;
|
||||
|
||||
bool operator==(const LayoutSize& aOther) const {
|
||||
bool operator==(const TypedSize2D_f32__LayerPixel& aOther) const {
|
||||
return width == aOther.width &&
|
||||
height == aOther.height;
|
||||
}
|
||||
};
|
||||
|
||||
typedef TypedSize2D_f32__LayerPixel LayerSize;
|
||||
|
||||
typedef LayerSize LayoutSize;
|
||||
|
||||
struct BuiltDisplayListDescriptor {
|
||||
uint64_t builder_start_time;
|
||||
uint64_t builder_finish_time;
|
||||
@ -278,7 +296,7 @@ struct WrOpacityProperty {
|
||||
}
|
||||
};
|
||||
|
||||
struct LayoutTransform {
|
||||
struct TypedTransform3D_f32__LayoutPixel__LayoutPixel {
|
||||
float m11;
|
||||
float m12;
|
||||
float m13;
|
||||
@ -296,7 +314,7 @@ struct LayoutTransform {
|
||||
float m43;
|
||||
float m44;
|
||||
|
||||
bool operator==(const LayoutTransform& aOther) const {
|
||||
bool operator==(const TypedTransform3D_f32__LayoutPixel__LayoutPixel& aOther) const {
|
||||
return m11 == aOther.m11 &&
|
||||
m12 == aOther.m12 &&
|
||||
m13 == aOther.m13 &&
|
||||
@ -316,25 +334,31 @@ struct LayoutTransform {
|
||||
}
|
||||
};
|
||||
|
||||
typedef LayerPixel LayoutPixel;
|
||||
|
||||
typedef TypedTransform3D_f32__LayoutPixel__LayoutPixel LayoutTransform;
|
||||
|
||||
struct WrTransformProperty {
|
||||
uint64_t id;
|
||||
LayoutTransform transform;
|
||||
};
|
||||
|
||||
struct WrIdNamespace {
|
||||
struct IdNamespace {
|
||||
uint32_t mHandle;
|
||||
|
||||
bool operator==(const WrIdNamespace& aOther) const {
|
||||
bool operator==(const IdNamespace& aOther) const {
|
||||
return mHandle == aOther.mHandle;
|
||||
}
|
||||
bool operator<(const WrIdNamespace& aOther) const {
|
||||
bool operator<(const IdNamespace& aOther) const {
|
||||
return mHandle < aOther.mHandle;
|
||||
}
|
||||
bool operator<=(const WrIdNamespace& aOther) const {
|
||||
bool operator<=(const IdNamespace& aOther) const {
|
||||
return mHandle <= aOther.mHandle;
|
||||
}
|
||||
};
|
||||
|
||||
typedef IdNamespace WrIdNamespace;
|
||||
|
||||
struct ColorF {
|
||||
float r;
|
||||
float g;
|
||||
@ -359,26 +383,20 @@ struct TypedPoint2D_f32__LayerPixel {
|
||||
}
|
||||
};
|
||||
|
||||
struct TypedSize2D_f32__LayerPixel {
|
||||
float width;
|
||||
float height;
|
||||
|
||||
bool operator==(const TypedSize2D_f32__LayerPixel& aOther) const {
|
||||
return width == aOther.width &&
|
||||
height == aOther.height;
|
||||
}
|
||||
};
|
||||
|
||||
struct LayoutRect {
|
||||
struct TypedRect_f32__LayerPixel {
|
||||
TypedPoint2D_f32__LayerPixel origin;
|
||||
TypedSize2D_f32__LayerPixel size;
|
||||
|
||||
bool operator==(const LayoutRect& aOther) const {
|
||||
bool operator==(const TypedRect_f32__LayerPixel& aOther) const {
|
||||
return origin == aOther.origin &&
|
||||
size == aOther.size;
|
||||
}
|
||||
};
|
||||
|
||||
typedef TypedRect_f32__LayerPixel LayerRect;
|
||||
|
||||
typedef LayerRect LayoutRect;
|
||||
|
||||
struct BorderWidths {
|
||||
float left;
|
||||
float top;
|
||||
@ -417,15 +435,9 @@ struct BorderRadius {
|
||||
}
|
||||
};
|
||||
|
||||
struct LayoutPoint {
|
||||
float x;
|
||||
float y;
|
||||
typedef TypedPoint2D_f32__LayerPixel LayerPoint;
|
||||
|
||||
bool operator==(const LayoutPoint& aOther) const {
|
||||
return x == aOther.x &&
|
||||
y == aOther.y;
|
||||
}
|
||||
};
|
||||
typedef LayerPoint LayoutPoint;
|
||||
|
||||
struct GradientStop {
|
||||
float offset;
|
||||
@ -437,20 +449,6 @@ struct GradientStop {
|
||||
}
|
||||
};
|
||||
|
||||
struct SideOffsets2D_f32 {
|
||||
float top;
|
||||
float right;
|
||||
float bottom;
|
||||
float left;
|
||||
|
||||
bool operator==(const SideOffsets2D_f32& aOther) const {
|
||||
return top == aOther.top &&
|
||||
right == aOther.right &&
|
||||
bottom == aOther.bottom &&
|
||||
left == aOther.left;
|
||||
}
|
||||
};
|
||||
|
||||
struct SideOffsets2D_u32 {
|
||||
uint32_t top;
|
||||
uint32_t right;
|
||||
@ -465,6 +463,20 @@ struct SideOffsets2D_u32 {
|
||||
}
|
||||
};
|
||||
|
||||
struct SideOffsets2D_f32 {
|
||||
float top;
|
||||
float right;
|
||||
float bottom;
|
||||
float left;
|
||||
|
||||
bool operator==(const SideOffsets2D_f32& aOther) const {
|
||||
return top == aOther.top &&
|
||||
right == aOther.right &&
|
||||
bottom == aOther.bottom &&
|
||||
left == aOther.left;
|
||||
}
|
||||
};
|
||||
|
||||
struct NinePatchDescriptor {
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
@ -477,16 +489,20 @@ struct NinePatchDescriptor {
|
||||
}
|
||||
};
|
||||
|
||||
struct LayoutVector2D {
|
||||
struct TypedVector2D_f32__LayerPixel {
|
||||
float x;
|
||||
float y;
|
||||
|
||||
bool operator==(const LayoutVector2D& aOther) const {
|
||||
bool operator==(const TypedVector2D_f32__LayerPixel& aOther) const {
|
||||
return x == aOther.x &&
|
||||
y == aOther.y;
|
||||
}
|
||||
};
|
||||
|
||||
typedef TypedVector2D_f32__LayerPixel LayerVector2D;
|
||||
|
||||
typedef LayerVector2D LayoutVector2D;
|
||||
|
||||
struct WrComplexClipRegion {
|
||||
LayoutRect rect;
|
||||
BorderRadius radii;
|
||||
@ -529,6 +545,8 @@ struct GlyphInstance {
|
||||
}
|
||||
};
|
||||
|
||||
typedef YuvColorSpace WrYuvColorSpace;
|
||||
|
||||
struct MutByteSlice {
|
||||
uint8_t *buffer;
|
||||
size_t len;
|
||||
|
Loading…
Reference in New Issue
Block a user