Skip to content

Bump skia to milestone 119 #3062

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions binding/SkiaSharp/Definitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public enum SKColorType
Bgr101010xXR = 21,
Srgba8888 = 22,
R8Unorm = 23,
Rgba10x6 = 24,
}

public static partial class SkiaExtensions
Expand Down Expand Up @@ -106,6 +107,7 @@ public static int GetBytesPerPixel (this SKColorType colorType) =>
SKColorType.RgbaF16Clamped => 8,
SKColorType.RgbaF16 => 8,
SKColorType.Rgba16161616 => 8,
SKColorType.Rgba10x6 => 8,
// 16
SKColorType.RgbaF32 => 16,
//
Expand Down Expand Up @@ -143,6 +145,7 @@ public static int GetBitShiftPerPixel (this SKColorType colorType) =>
SKColorType.RgbaF16Clamped => 3,
SKColorType.RgbaF16 => 3,
SKColorType.Rgba16161616 => 3,
SKColorType.Rgba10x6 => 3,
// 4
SKColorType.RgbaF32 => 4,
//
Expand Down Expand Up @@ -177,6 +180,7 @@ public static SKAlphaType GetAlphaType (this SKColorType colorType, SKAlphaType
case SKColorType.RgbaF16:
case SKColorType.RgbaF32:
case SKColorType.Rgba16161616:
case SKColorType.Rgba10x6:
break;

// opaque
Expand Down
2 changes: 2 additions & 0 deletions binding/SkiaSharp/EnumMappings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ internal static SKColorTypeNative ToNative (this SKColorType colorType) =>
SKColorType.Alpha16 => SKColorTypeNative.A16Unorm,
SKColorType.Rg1616 => SKColorTypeNative.R16g16Unorm,
SKColorType.Rgba16161616 => SKColorTypeNative.R16g16b16a16Unorm,
SKColorType.Rgba10x6 => SKColorTypeNative.Rgba10x6,
SKColorType.Bgra1010102 => SKColorTypeNative.Bgra1010102,
SKColorType.Bgr101010x => SKColorTypeNative.Bgr101010x,
SKColorType.Bgr101010xXR => SKColorTypeNative.Bgr101010xXr,
Expand Down Expand Up @@ -92,6 +93,7 @@ internal static SKColorType FromNative (this SKColorTypeNative colorType) =>
SKColorTypeNative.A16Unorm => SKColorType.Alpha16,
SKColorTypeNative.R16g16Unorm => SKColorType.Rg1616,
SKColorTypeNative.R16g16b16a16Unorm => SKColorType.Rgba16161616,
SKColorTypeNative.Rgba10x6 => SKColorType.Rgba10x6,
SKColorTypeNative.Bgra1010102 => SKColorType.Bgra1010102,
SKColorTypeNative.Bgr101010x => SKColorType.Bgr101010x,
SKColorTypeNative.Bgr101010xXr => SKColorType.Bgr101010xXR,
Expand Down
1 change: 1 addition & 0 deletions binding/SkiaSharp/GRDefinitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ public static uint ToGlSizedFormat (this SKColorType colorType) =>
SKColorType.Alpha16 => GRGlSizedFormat.R16,
SKColorType.Rg1616 => GRGlSizedFormat.RG16,
SKColorType.Rgba16161616 => GRGlSizedFormat.RGBA16,
SKColorType.Rgba10x6 => 0,
SKColorType.RgF16 => GRGlSizedFormat.RG16F,
SKColorType.Rg88 => GRGlSizedFormat.RG8,
SKColorType.Rgb101010x => 0,
Expand Down
168 changes: 85 additions & 83 deletions binding/SkiaSharp/SkiaApi.generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18449,6 +18449,63 @@ public readonly override int GetHashCode ()

}

// sk_document_pdf_datetime_t
[StructLayout (LayoutKind.Sequential)]
internal unsafe partial struct SKTimeDateTimeInternal : IEquatable<SKTimeDateTimeInternal> {
// public int16_t fTimeZoneMinutes
public Int16 fTimeZoneMinutes;

// public uint16_t fYear
public UInt16 fYear;

// public uint8_t fMonth
public Byte fMonth;

// public uint8_t fDayOfWeek
public Byte fDayOfWeek;

// public uint8_t fDay
public Byte fDay;

// public uint8_t fHour
public Byte fHour;

// public uint8_t fMinute
public Byte fMinute;

// public uint8_t fSecond
public Byte fSecond;

public readonly bool Equals (SKTimeDateTimeInternal obj) =>
#pragma warning disable CS8909
fTimeZoneMinutes == obj.fTimeZoneMinutes && fYear == obj.fYear && fMonth == obj.fMonth && fDayOfWeek == obj.fDayOfWeek && fDay == obj.fDay && fHour == obj.fHour && fMinute == obj.fMinute && fSecond == obj.fSecond;
#pragma warning restore CS8909

public readonly override bool Equals (object obj) =>
obj is SKTimeDateTimeInternal f && Equals (f);

public static bool operator == (SKTimeDateTimeInternal left, SKTimeDateTimeInternal right) =>
left.Equals (right);

public static bool operator != (SKTimeDateTimeInternal left, SKTimeDateTimeInternal right) =>
!left.Equals (right);

public readonly override int GetHashCode ()
{
var hash = new HashCode ();
hash.Add (fTimeZoneMinutes);
hash.Add (fYear);
hash.Add (fMonth);
hash.Add (fDayOfWeek);
hash.Add (fDay);
hash.Add (fHour);
hash.Add (fMinute);
hash.Add (fSecond);
return hash.ToHashCode ();
}

}

// sk_document_pdf_metadata_t
[StructLayout (LayoutKind.Sequential)]
internal unsafe partial struct SKDocumentPdfMetadataInternal : IEquatable<SKDocumentPdfMetadataInternal> {
Expand All @@ -18470,10 +18527,10 @@ internal unsafe partial struct SKDocumentPdfMetadataInternal : IEquatable<SKDocu
// public sk_string_t* fProducer
public sk_string_t fProducer;

// public sk_time_datetime_t* fCreation
// public sk_document_pdf_datetime_t* fCreation
public SKTimeDateTimeInternal* fCreation;

// public sk_time_datetime_t* fModified
// public sk_document_pdf_datetime_t* fModified
public SKTimeDateTimeInternal* fModified;

// public float fRasterDPI
Expand Down Expand Up @@ -19955,63 +20012,6 @@ public readonly override int GetHashCode ()

}

// sk_time_datetime_t
[StructLayout (LayoutKind.Sequential)]
internal unsafe partial struct SKTimeDateTimeInternal : IEquatable<SKTimeDateTimeInternal> {
// public int16_t fTimeZoneMinutes
public Int16 fTimeZoneMinutes;

// public uint16_t fYear
public UInt16 fYear;

// public uint8_t fMonth
public Byte fMonth;

// public uint8_t fDayOfWeek
public Byte fDayOfWeek;

// public uint8_t fDay
public Byte fDay;

// public uint8_t fHour
public Byte fHour;

// public uint8_t fMinute
public Byte fMinute;

// public uint8_t fSecond
public Byte fSecond;

public readonly bool Equals (SKTimeDateTimeInternal obj) =>
#pragma warning disable CS8909
fTimeZoneMinutes == obj.fTimeZoneMinutes && fYear == obj.fYear && fMonth == obj.fMonth && fDayOfWeek == obj.fDayOfWeek && fDay == obj.fDay && fHour == obj.fHour && fMinute == obj.fMinute && fSecond == obj.fSecond;
#pragma warning restore CS8909

public readonly override bool Equals (object obj) =>
obj is SKTimeDateTimeInternal f && Equals (f);

public static bool operator == (SKTimeDateTimeInternal left, SKTimeDateTimeInternal right) =>
left.Equals (right);

public static bool operator != (SKTimeDateTimeInternal left, SKTimeDateTimeInternal right) =>
!left.Equals (right);

public readonly override int GetHashCode ()
{
var hash = new HashCode ();
hash.Add (fTimeZoneMinutes);
hash.Add (fYear);
hash.Add (fMonth);
hash.Add (fDayOfWeek);
hash.Add (fDay);
hash.Add (fHour);
hash.Add (fMinute);
hash.Add (fSecond);
return hash.ToHashCode ();
}

}

// sk_webpencoder_options_t
[StructLayout (LayoutKind.Sequential)]
public readonly unsafe partial struct SKWebpEncoderOptions : IEquatable<SKWebpEncoderOptions> {
Expand Down Expand Up @@ -20281,30 +20281,32 @@ internal enum SKColorTypeNative {
Bgr101010x = 10,
// BGR_101010X_XR_SK_COLORTYPE = 11
Bgr101010xXr = 11,
// GRAY_8_SK_COLORTYPE = 12
Gray8 = 12,
// RGBA_F16_NORM_SK_COLORTYPE = 13
RgbaF16Norm = 13,
// RGBA_F16_SK_COLORTYPE = 14
RgbaF16 = 14,
// RGBA_F32_SK_COLORTYPE = 15
RgbaF32 = 15,
// R8G8_UNORM_SK_COLORTYPE = 16
R8g8Unorm = 16,
// A16_FLOAT_SK_COLORTYPE = 17
A16Float = 17,
// R16G16_FLOAT_SK_COLORTYPE = 18
R16g16Float = 18,
// A16_UNORM_SK_COLORTYPE = 19
A16Unorm = 19,
// R16G16_UNORM_SK_COLORTYPE = 20
R16g16Unorm = 20,
// R16G16B16A16_UNORM_SK_COLORTYPE = 21
R16g16b16a16Unorm = 21,
// SRGBA_8888_SK_COLORTYPE = 22
Srgba8888 = 22,
// R8_UNORM_SK_COLORTYPE = 23
R8Unorm = 23,
// RGBA_10X6_SK_COLORTYPE = 12
Rgba10x6 = 12,
// GRAY_8_SK_COLORTYPE = 13
Gray8 = 13,
// RGBA_F16_NORM_SK_COLORTYPE = 14
RgbaF16Norm = 14,
// RGBA_F16_SK_COLORTYPE = 15
RgbaF16 = 15,
// RGBA_F32_SK_COLORTYPE = 16
RgbaF32 = 16,
// R8G8_UNORM_SK_COLORTYPE = 17
R8g8Unorm = 17,
// A16_FLOAT_SK_COLORTYPE = 18
A16Float = 18,
// R16G16_FLOAT_SK_COLORTYPE = 19
R16g16Float = 19,
// A16_UNORM_SK_COLORTYPE = 20
A16Unorm = 20,
// R16G16_UNORM_SK_COLORTYPE = 21
R16g16Unorm = 21,
// R16G16B16A16_UNORM_SK_COLORTYPE = 22
R16g16b16a16Unorm = 22,
// SRGBA_8888_SK_COLORTYPE = 23
Srgba8888 = 23,
// R8_UNORM_SK_COLORTYPE = 24
R8Unorm = 24,
}

// sk_encoded_image_format_t
Expand Down
2 changes: 1 addition & 1 deletion binding/libSkiaSharp.json
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@
}
},
// internal types
"sk_time_datetime_t": {
"sk_document_pdf_datetime_t": {
"cs": "SKTimeDateTimeInternal",
"internal": true
},
Expand Down
2 changes: 1 addition & 1 deletion externals/skia
Submodule skia updated 2114 files
66 changes: 33 additions & 33 deletions scripts/VERSIONS.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# dependencies
mdoc release 5.8.9
harfbuzz release 8.3.1
skia release m118
skia release m119
xunit release 2.4.2
xunit.runner.console release 2.4.2
OpenTK release 3.1.0
Expand All @@ -23,53 +23,53 @@ ANGLE release chromium/6275
# this is related to the API versions, not the library versions
# - milestone: the skia milestone determined by Google/Chromium
# - increment: the C API version increment caused by new APIs (externals\skia\include\c\sk_types.h)
libSkiaSharp milestone 118
libSkiaSharp milestone 119
libSkiaSharp increment 0

# native sonames
# <milestone>.<increment>.0
libSkiaSharp soname 118.0.0
libSkiaSharp soname 119.0.0
# 0.<60000 + major*100 + minor*10 + micro>.0
HarfBuzz soname 0.60831.0

# SkiaSharp.dll
SkiaSharp assembly 3.118.0.0
SkiaSharp file 3.118.0.0
SkiaSharp assembly 3.119.0.0
SkiaSharp file 3.119.0.0

# HarfBuzzSharp.dll
HarfBuzzSharp assembly 1.0.0.0
HarfBuzzSharp file 8.3.1

# nuget versions
# SkiaSharp
SkiaSharp nuget 3.118.0
SkiaSharp.NativeAssets.Linux nuget 3.118.0
SkiaSharp.NativeAssets.Linux.NoDependencies nuget 3.118.0
SkiaSharp.NativeAssets.NanoServer nuget 3.118.0
SkiaSharp.NativeAssets.WebAssembly nuget 3.118.0
SkiaSharp.NativeAssets.Android nuget 3.118.0
SkiaSharp.NativeAssets.iOS nuget 3.118.0
SkiaSharp.NativeAssets.MacCatalyst nuget 3.118.0
SkiaSharp.NativeAssets.macOS nuget 3.118.0
SkiaSharp.NativeAssets.Tizen nuget 3.118.0
SkiaSharp.NativeAssets.tvOS nuget 3.118.0
SkiaSharp.NativeAssets.Win32 nuget 3.118.0
SkiaSharp.NativeAssets.WinUI nuget 3.118.0
SkiaSharp.Views nuget 3.118.0
SkiaSharp.Views.Desktop.Common nuget 3.118.0
SkiaSharp.Views.Gtk3 nuget 3.118.0
SkiaSharp.Views.WindowsForms nuget 3.118.0
SkiaSharp.Views.WPF nuget 3.118.0
SkiaSharp.Views.Uno.WinUI nuget 3.118.0
SkiaSharp.Views.WinUI nuget 3.118.0
SkiaSharp.Views.Maui.Core nuget 3.118.0
SkiaSharp.Views.Maui.Controls nuget 3.118.0
SkiaSharp.Views.Blazor nuget 3.118.0
SkiaSharp.HarfBuzz nuget 3.118.0
SkiaSharp.Skottie nuget 3.118.0
SkiaSharp.SceneGraph nuget 3.118.0
SkiaSharp.Resources nuget 3.118.0
SkiaSharp.Vulkan.SharpVk nuget 3.118.0
SkiaSharp nuget 3.119.0
SkiaSharp.NativeAssets.Linux nuget 3.119.0
SkiaSharp.NativeAssets.Linux.NoDependencies nuget 3.119.0
SkiaSharp.NativeAssets.NanoServer nuget 3.119.0
SkiaSharp.NativeAssets.WebAssembly nuget 3.119.0
SkiaSharp.NativeAssets.Android nuget 3.119.0
SkiaSharp.NativeAssets.iOS nuget 3.119.0
SkiaSharp.NativeAssets.MacCatalyst nuget 3.119.0
SkiaSharp.NativeAssets.macOS nuget 3.119.0
SkiaSharp.NativeAssets.Tizen nuget 3.119.0
SkiaSharp.NativeAssets.tvOS nuget 3.119.0
SkiaSharp.NativeAssets.Win32 nuget 3.119.0
SkiaSharp.NativeAssets.WinUI nuget 3.119.0
SkiaSharp.Views nuget 3.119.0
SkiaSharp.Views.Desktop.Common nuget 3.119.0
SkiaSharp.Views.Gtk3 nuget 3.119.0
SkiaSharp.Views.WindowsForms nuget 3.119.0
SkiaSharp.Views.WPF nuget 3.119.0
SkiaSharp.Views.Uno.WinUI nuget 3.119.0
SkiaSharp.Views.WinUI nuget 3.119.0
SkiaSharp.Views.Maui.Core nuget 3.119.0
SkiaSharp.Views.Maui.Controls nuget 3.119.0
SkiaSharp.Views.Blazor nuget 3.119.0
SkiaSharp.HarfBuzz nuget 3.119.0
SkiaSharp.Skottie nuget 3.119.0
SkiaSharp.SceneGraph nuget 3.119.0
SkiaSharp.Resources nuget 3.119.0
SkiaSharp.Vulkan.SharpVk nuget 3.119.0
# HarfBuzzSharp
HarfBuzzSharp nuget 8.3.1
HarfBuzzSharp.NativeAssets.Android nuget 8.3.1
Expand Down
2 changes: 1 addition & 1 deletion scripts/azure-pipelines-variables.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
variables:
SKIASHARP_MAJOR_VERSION: 3
SKIASHARP_VERSION: 3.118.0
SKIASHARP_VERSION: 3.119.0
FEATURE_NAME_PREFIX: 'feature/'
VERBOSITY: normal
GIT_SHA: $(Build.SourceVersion)
Expand Down
3 changes: 2 additions & 1 deletion tests/Tests/SkiaSharp/GRContextTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public void ToGlSizedFormat()
SKColorType.RgbaF32,
SKColorType.Bgra1010102,
SKColorType.Bgr101010x,
SKColorType.Bgr101010xXR
SKColorType.Bgr101010xXR,
SKColorType.Rgba10x6,
};

foreach (SKColorType value in Enum.GetValues(typeof(SKColorType)))
Expand Down
5 changes: 5 additions & 0 deletions tests/Tests/SkiaSharp/SKBitmapTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ public void CopyWithAlphaToSucceeds(SKColorType colorType)
// SRGB processing
Assert.Equal((SKColor)0xAAFE0000, color);
}
else if (colorType == SKColorType.Rgba10x6)
{
// alpha % is included
Assert.Equal((SKColor)0xAAAA0000, color);
}
else
{
Assert.Equal((SKColor)0xAAFF0000, color);
Expand Down
Loading