m85: stick to u32 typemasks in the Matrix type
@@ -12,12 +12,15 @@ fn test_apply_perspective_clip_naming() {
}
bitflags! {
- pub struct TypeMask: i32 {
- const IDENTITY = sb::SkMatrix_TypeMask_kIdentity_Mask;
- const TRANSLATE = sb::SkMatrix_TypeMask_kTranslate_Mask;
- const SCALE = sb::SkMatrix_TypeMask_kScale_Mask;
- const AFFINE = sb::SkMatrix_TypeMask_kAffine_Mask;
- const PERSPECTIVE = sb::SkMatrix_TypeMask_kPerspective_Mask;
+ // m85: On Windows the SkMatrix_TypeMask is defined as i32,
+ // but we stick to u32 (macOS / Linux), because there is no need to propagate
+ // the platform difference to the Rust side.
+ pub struct TypeMask: u32 {
+ const IDENTITY = sb::SkMatrix_TypeMask_kIdentity_Mask as _;
+ const TRANSLATE = sb::SkMatrix_TypeMask_kTranslate_Mask as _;
+ const SCALE = sb::SkMatrix_TypeMask_kScale_Mask as _;
+ const AFFINE = sb::SkMatrix_TypeMask_kAffine_Mask as _;
+ const PERSPECTIVE = sb::SkMatrix_TypeMask_kPerspective_Mask as _;
}
}
@@ -31,7 +34,7 @@ fn test_matrix_scale_to_fit_naming() {
#[repr(C)]
pub struct Matrix {
mat: [scalar; 9usize],
- type_mask: i32,
+ type_mask: u32,
}
impl NativeTransmutable<SkMatrix> for Matrix {}
