Skip to content

Commit 55f1b2c

Browse files
authored
Bump skia to milestone 119 (#3062)
* Bump skia to milestone 119 * SkTime::DateTime is replaced with SkPDF::DateTime * Add the new color type * Use the new SkImages::MakeWithFilter instead * Update the GrDirectContext APIs
1 parent b8f6d3a commit 55f1b2c

File tree

12 files changed

+161
-121
lines changed

12 files changed

+161
-121
lines changed

binding/SkiaSharp/Definitions.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public enum SKColorType
5959
Bgr101010xXR = 21,
6060
Srgba8888 = 22,
6161
R8Unorm = 23,
62+
Rgba10x6 = 24,
6263
}
6364

6465
public static partial class SkiaExtensions
@@ -106,6 +107,7 @@ public static int GetBytesPerPixel (this SKColorType colorType) =>
106107
SKColorType.RgbaF16Clamped => 8,
107108
SKColorType.RgbaF16 => 8,
108109
SKColorType.Rgba16161616 => 8,
110+
SKColorType.Rgba10x6 => 8,
109111
// 16
110112
SKColorType.RgbaF32 => 16,
111113
//
@@ -143,6 +145,7 @@ public static int GetBitShiftPerPixel (this SKColorType colorType) =>
143145
SKColorType.RgbaF16Clamped => 3,
144146
SKColorType.RgbaF16 => 3,
145147
SKColorType.Rgba16161616 => 3,
148+
SKColorType.Rgba10x6 => 3,
146149
// 4
147150
SKColorType.RgbaF32 => 4,
148151
//
@@ -177,6 +180,7 @@ public static SKAlphaType GetAlphaType (this SKColorType colorType, SKAlphaType
177180
case SKColorType.RgbaF16:
178181
case SKColorType.RgbaF32:
179182
case SKColorType.Rgba16161616:
183+
case SKColorType.Rgba10x6:
180184
break;
181185

182186
// opaque

binding/SkiaSharp/EnumMappings.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ internal static SKColorTypeNative ToNative (this SKColorType colorType) =>
6262
SKColorType.Alpha16 => SKColorTypeNative.A16Unorm,
6363
SKColorType.Rg1616 => SKColorTypeNative.R16g16Unorm,
6464
SKColorType.Rgba16161616 => SKColorTypeNative.R16g16b16a16Unorm,
65+
SKColorType.Rgba10x6 => SKColorTypeNative.Rgba10x6,
6566
SKColorType.Bgra1010102 => SKColorTypeNative.Bgra1010102,
6667
SKColorType.Bgr101010x => SKColorTypeNative.Bgr101010x,
6768
SKColorType.Bgr101010xXR => SKColorTypeNative.Bgr101010xXr,
@@ -92,6 +93,7 @@ internal static SKColorType FromNative (this SKColorTypeNative colorType) =>
9293
SKColorTypeNative.A16Unorm => SKColorType.Alpha16,
9394
SKColorTypeNative.R16g16Unorm => SKColorType.Rg1616,
9495
SKColorTypeNative.R16g16b16a16Unorm => SKColorType.Rgba16161616,
96+
SKColorTypeNative.Rgba10x6 => SKColorType.Rgba10x6,
9597
SKColorTypeNative.Bgra1010102 => SKColorType.Bgra1010102,
9698
SKColorTypeNative.Bgr101010x => SKColorType.Bgr101010x,
9799
SKColorTypeNative.Bgr101010xXr => SKColorType.Bgr101010xXR,

binding/SkiaSharp/GRDefinitions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ public static uint ToGlSizedFormat (this SKColorType colorType) =>
153153
SKColorType.Alpha16 => GRGlSizedFormat.R16,
154154
SKColorType.Rg1616 => GRGlSizedFormat.RG16,
155155
SKColorType.Rgba16161616 => GRGlSizedFormat.RGBA16,
156+
SKColorType.Rgba10x6 => 0,
156157
SKColorType.RgF16 => GRGlSizedFormat.RG16F,
157158
SKColorType.Rg88 => GRGlSizedFormat.RG8,
158159
SKColorType.Rgb101010x => 0,

binding/SkiaSharp/SkiaApi.generated.cs

Lines changed: 85 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -18449,6 +18449,63 @@ public readonly override int GetHashCode ()
1844918449

1845018450
}
1845118451

18452+
// sk_document_pdf_datetime_t
18453+
[StructLayout (LayoutKind.Sequential)]
18454+
internal unsafe partial struct SKTimeDateTimeInternal : IEquatable<SKTimeDateTimeInternal> {
18455+
// public int16_t fTimeZoneMinutes
18456+
public Int16 fTimeZoneMinutes;
18457+
18458+
// public uint16_t fYear
18459+
public UInt16 fYear;
18460+
18461+
// public uint8_t fMonth
18462+
public Byte fMonth;
18463+
18464+
// public uint8_t fDayOfWeek
18465+
public Byte fDayOfWeek;
18466+
18467+
// public uint8_t fDay
18468+
public Byte fDay;
18469+
18470+
// public uint8_t fHour
18471+
public Byte fHour;
18472+
18473+
// public uint8_t fMinute
18474+
public Byte fMinute;
18475+
18476+
// public uint8_t fSecond
18477+
public Byte fSecond;
18478+
18479+
public readonly bool Equals (SKTimeDateTimeInternal obj) =>
18480+
#pragma warning disable CS8909
18481+
fTimeZoneMinutes == obj.fTimeZoneMinutes && fYear == obj.fYear && fMonth == obj.fMonth && fDayOfWeek == obj.fDayOfWeek && fDay == obj.fDay && fHour == obj.fHour && fMinute == obj.fMinute && fSecond == obj.fSecond;
18482+
#pragma warning restore CS8909
18483+
18484+
public readonly override bool Equals (object obj) =>
18485+
obj is SKTimeDateTimeInternal f && Equals (f);
18486+
18487+
public static bool operator == (SKTimeDateTimeInternal left, SKTimeDateTimeInternal right) =>
18488+
left.Equals (right);
18489+
18490+
public static bool operator != (SKTimeDateTimeInternal left, SKTimeDateTimeInternal right) =>
18491+
!left.Equals (right);
18492+
18493+
public readonly override int GetHashCode ()
18494+
{
18495+
var hash = new HashCode ();
18496+
hash.Add (fTimeZoneMinutes);
18497+
hash.Add (fYear);
18498+
hash.Add (fMonth);
18499+
hash.Add (fDayOfWeek);
18500+
hash.Add (fDay);
18501+
hash.Add (fHour);
18502+
hash.Add (fMinute);
18503+
hash.Add (fSecond);
18504+
return hash.ToHashCode ();
18505+
}
18506+
18507+
}
18508+
1845218509
// sk_document_pdf_metadata_t
1845318510
[StructLayout (LayoutKind.Sequential)]
1845418511
internal unsafe partial struct SKDocumentPdfMetadataInternal : IEquatable<SKDocumentPdfMetadataInternal> {
@@ -18470,10 +18527,10 @@ internal unsafe partial struct SKDocumentPdfMetadataInternal : IEquatable<SKDocu
1847018527
// public sk_string_t* fProducer
1847118528
public sk_string_t fProducer;
1847218529

18473-
// public sk_time_datetime_t* fCreation
18530+
// public sk_document_pdf_datetime_t* fCreation
1847418531
public SKTimeDateTimeInternal* fCreation;
1847518532

18476-
// public sk_time_datetime_t* fModified
18533+
// public sk_document_pdf_datetime_t* fModified
1847718534
public SKTimeDateTimeInternal* fModified;
1847818535

1847918536
// public float fRasterDPI
@@ -19955,63 +20012,6 @@ public readonly override int GetHashCode ()
1995520012

1995620013
}
1995720014

19958-
// sk_time_datetime_t
19959-
[StructLayout (LayoutKind.Sequential)]
19960-
internal unsafe partial struct SKTimeDateTimeInternal : IEquatable<SKTimeDateTimeInternal> {
19961-
// public int16_t fTimeZoneMinutes
19962-
public Int16 fTimeZoneMinutes;
19963-
19964-
// public uint16_t fYear
19965-
public UInt16 fYear;
19966-
19967-
// public uint8_t fMonth
19968-
public Byte fMonth;
19969-
19970-
// public uint8_t fDayOfWeek
19971-
public Byte fDayOfWeek;
19972-
19973-
// public uint8_t fDay
19974-
public Byte fDay;
19975-
19976-
// public uint8_t fHour
19977-
public Byte fHour;
19978-
19979-
// public uint8_t fMinute
19980-
public Byte fMinute;
19981-
19982-
// public uint8_t fSecond
19983-
public Byte fSecond;
19984-
19985-
public readonly bool Equals (SKTimeDateTimeInternal obj) =>
19986-
#pragma warning disable CS8909
19987-
fTimeZoneMinutes == obj.fTimeZoneMinutes && fYear == obj.fYear && fMonth == obj.fMonth && fDayOfWeek == obj.fDayOfWeek && fDay == obj.fDay && fHour == obj.fHour && fMinute == obj.fMinute && fSecond == obj.fSecond;
19988-
#pragma warning restore CS8909
19989-
19990-
public readonly override bool Equals (object obj) =>
19991-
obj is SKTimeDateTimeInternal f && Equals (f);
19992-
19993-
public static bool operator == (SKTimeDateTimeInternal left, SKTimeDateTimeInternal right) =>
19994-
left.Equals (right);
19995-
19996-
public static bool operator != (SKTimeDateTimeInternal left, SKTimeDateTimeInternal right) =>
19997-
!left.Equals (right);
19998-
19999-
public readonly override int GetHashCode ()
20000-
{
20001-
var hash = new HashCode ();
20002-
hash.Add (fTimeZoneMinutes);
20003-
hash.Add (fYear);
20004-
hash.Add (fMonth);
20005-
hash.Add (fDayOfWeek);
20006-
hash.Add (fDay);
20007-
hash.Add (fHour);
20008-
hash.Add (fMinute);
20009-
hash.Add (fSecond);
20010-
return hash.ToHashCode ();
20011-
}
20012-
20013-
}
20014-
2001520015
// sk_webpencoder_options_t
2001620016
[StructLayout (LayoutKind.Sequential)]
2001720017
public readonly unsafe partial struct SKWebpEncoderOptions : IEquatable<SKWebpEncoderOptions> {
@@ -20281,30 +20281,32 @@ internal enum SKColorTypeNative {
2028120281
Bgr101010x = 10,
2028220282
// BGR_101010X_XR_SK_COLORTYPE = 11
2028320283
Bgr101010xXr = 11,
20284-
// GRAY_8_SK_COLORTYPE = 12
20285-
Gray8 = 12,
20286-
// RGBA_F16_NORM_SK_COLORTYPE = 13
20287-
RgbaF16Norm = 13,
20288-
// RGBA_F16_SK_COLORTYPE = 14
20289-
RgbaF16 = 14,
20290-
// RGBA_F32_SK_COLORTYPE = 15
20291-
RgbaF32 = 15,
20292-
// R8G8_UNORM_SK_COLORTYPE = 16
20293-
R8g8Unorm = 16,
20294-
// A16_FLOAT_SK_COLORTYPE = 17
20295-
A16Float = 17,
20296-
// R16G16_FLOAT_SK_COLORTYPE = 18
20297-
R16g16Float = 18,
20298-
// A16_UNORM_SK_COLORTYPE = 19
20299-
A16Unorm = 19,
20300-
// R16G16_UNORM_SK_COLORTYPE = 20
20301-
R16g16Unorm = 20,
20302-
// R16G16B16A16_UNORM_SK_COLORTYPE = 21
20303-
R16g16b16a16Unorm = 21,
20304-
// SRGBA_8888_SK_COLORTYPE = 22
20305-
Srgba8888 = 22,
20306-
// R8_UNORM_SK_COLORTYPE = 23
20307-
R8Unorm = 23,
20284+
// RGBA_10X6_SK_COLORTYPE = 12
20285+
Rgba10x6 = 12,
20286+
// GRAY_8_SK_COLORTYPE = 13
20287+
Gray8 = 13,
20288+
// RGBA_F16_NORM_SK_COLORTYPE = 14
20289+
RgbaF16Norm = 14,
20290+
// RGBA_F16_SK_COLORTYPE = 15
20291+
RgbaF16 = 15,
20292+
// RGBA_F32_SK_COLORTYPE = 16
20293+
RgbaF32 = 16,
20294+
// R8G8_UNORM_SK_COLORTYPE = 17
20295+
R8g8Unorm = 17,
20296+
// A16_FLOAT_SK_COLORTYPE = 18
20297+
A16Float = 18,
20298+
// R16G16_FLOAT_SK_COLORTYPE = 19
20299+
R16g16Float = 19,
20300+
// A16_UNORM_SK_COLORTYPE = 20
20301+
A16Unorm = 20,
20302+
// R16G16_UNORM_SK_COLORTYPE = 21
20303+
R16g16Unorm = 21,
20304+
// R16G16B16A16_UNORM_SK_COLORTYPE = 22
20305+
R16g16b16a16Unorm = 22,
20306+
// SRGBA_8888_SK_COLORTYPE = 23
20307+
Srgba8888 = 23,
20308+
// R8_UNORM_SK_COLORTYPE = 24
20309+
R8Unorm = 24,
2030820310
}
2030920311

2031020312
// sk_encoded_image_format_t

binding/libSkiaSharp.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@
341341
}
342342
},
343343
// internal types
344-
"sk_time_datetime_t": {
344+
"sk_document_pdf_datetime_t": {
345345
"cs": "SKTimeDateTimeInternal",
346346
"internal": true
347347
},

externals/skia

Submodule skia updated 2114 files

scripts/VERSIONS.txt

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# dependencies
22
mdoc release 5.8.9
33
harfbuzz release 8.3.1
4-
skia release m118
4+
skia release m119
55
xunit release 2.4.2
66
xunit.runner.console release 2.4.2
77
OpenTK release 3.1.0
@@ -23,53 +23,53 @@ ANGLE release chromium/6275
2323
# this is related to the API versions, not the library versions
2424
# - milestone: the skia milestone determined by Google/Chromium
2525
# - increment: the C API version increment caused by new APIs (externals\skia\include\c\sk_types.h)
26-
libSkiaSharp milestone 118
26+
libSkiaSharp milestone 119
2727
libSkiaSharp increment 0
2828

2929
# native sonames
3030
# <milestone>.<increment>.0
31-
libSkiaSharp soname 118.0.0
31+
libSkiaSharp soname 119.0.0
3232
# 0.<60000 + major*100 + minor*10 + micro>.0
3333
HarfBuzz soname 0.60831.0
3434

3535
# SkiaSharp.dll
36-
SkiaSharp assembly 3.118.0.0
37-
SkiaSharp file 3.118.0.0
36+
SkiaSharp assembly 3.119.0.0
37+
SkiaSharp file 3.119.0.0
3838

3939
# HarfBuzzSharp.dll
4040
HarfBuzzSharp assembly 1.0.0.0
4141
HarfBuzzSharp file 8.3.1
4242

4343
# nuget versions
4444
# SkiaSharp
45-
SkiaSharp nuget 3.118.0
46-
SkiaSharp.NativeAssets.Linux nuget 3.118.0
47-
SkiaSharp.NativeAssets.Linux.NoDependencies nuget 3.118.0
48-
SkiaSharp.NativeAssets.NanoServer nuget 3.118.0
49-
SkiaSharp.NativeAssets.WebAssembly nuget 3.118.0
50-
SkiaSharp.NativeAssets.Android nuget 3.118.0
51-
SkiaSharp.NativeAssets.iOS nuget 3.118.0
52-
SkiaSharp.NativeAssets.MacCatalyst nuget 3.118.0
53-
SkiaSharp.NativeAssets.macOS nuget 3.118.0
54-
SkiaSharp.NativeAssets.Tizen nuget 3.118.0
55-
SkiaSharp.NativeAssets.tvOS nuget 3.118.0
56-
SkiaSharp.NativeAssets.Win32 nuget 3.118.0
57-
SkiaSharp.NativeAssets.WinUI nuget 3.118.0
58-
SkiaSharp.Views nuget 3.118.0
59-
SkiaSharp.Views.Desktop.Common nuget 3.118.0
60-
SkiaSharp.Views.Gtk3 nuget 3.118.0
61-
SkiaSharp.Views.WindowsForms nuget 3.118.0
62-
SkiaSharp.Views.WPF nuget 3.118.0
63-
SkiaSharp.Views.Uno.WinUI nuget 3.118.0
64-
SkiaSharp.Views.WinUI nuget 3.118.0
65-
SkiaSharp.Views.Maui.Core nuget 3.118.0
66-
SkiaSharp.Views.Maui.Controls nuget 3.118.0
67-
SkiaSharp.Views.Blazor nuget 3.118.0
68-
SkiaSharp.HarfBuzz nuget 3.118.0
69-
SkiaSharp.Skottie nuget 3.118.0
70-
SkiaSharp.SceneGraph nuget 3.118.0
71-
SkiaSharp.Resources nuget 3.118.0
72-
SkiaSharp.Vulkan.SharpVk nuget 3.118.0
45+
SkiaSharp nuget 3.119.0
46+
SkiaSharp.NativeAssets.Linux nuget 3.119.0
47+
SkiaSharp.NativeAssets.Linux.NoDependencies nuget 3.119.0
48+
SkiaSharp.NativeAssets.NanoServer nuget 3.119.0
49+
SkiaSharp.NativeAssets.WebAssembly nuget 3.119.0
50+
SkiaSharp.NativeAssets.Android nuget 3.119.0
51+
SkiaSharp.NativeAssets.iOS nuget 3.119.0
52+
SkiaSharp.NativeAssets.MacCatalyst nuget 3.119.0
53+
SkiaSharp.NativeAssets.macOS nuget 3.119.0
54+
SkiaSharp.NativeAssets.Tizen nuget 3.119.0
55+
SkiaSharp.NativeAssets.tvOS nuget 3.119.0
56+
SkiaSharp.NativeAssets.Win32 nuget 3.119.0
57+
SkiaSharp.NativeAssets.WinUI nuget 3.119.0
58+
SkiaSharp.Views nuget 3.119.0
59+
SkiaSharp.Views.Desktop.Common nuget 3.119.0
60+
SkiaSharp.Views.Gtk3 nuget 3.119.0
61+
SkiaSharp.Views.WindowsForms nuget 3.119.0
62+
SkiaSharp.Views.WPF nuget 3.119.0
63+
SkiaSharp.Views.Uno.WinUI nuget 3.119.0
64+
SkiaSharp.Views.WinUI nuget 3.119.0
65+
SkiaSharp.Views.Maui.Core nuget 3.119.0
66+
SkiaSharp.Views.Maui.Controls nuget 3.119.0
67+
SkiaSharp.Views.Blazor nuget 3.119.0
68+
SkiaSharp.HarfBuzz nuget 3.119.0
69+
SkiaSharp.Skottie nuget 3.119.0
70+
SkiaSharp.SceneGraph nuget 3.119.0
71+
SkiaSharp.Resources nuget 3.119.0
72+
SkiaSharp.Vulkan.SharpVk nuget 3.119.0
7373
# HarfBuzzSharp
7474
HarfBuzzSharp nuget 8.3.1
7575
HarfBuzzSharp.NativeAssets.Android nuget 8.3.1

scripts/azure-pipelines-variables.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
variables:
22
SKIASHARP_MAJOR_VERSION: 3
3-
SKIASHARP_VERSION: 3.118.0
3+
SKIASHARP_VERSION: 3.119.0
44
FEATURE_NAME_PREFIX: 'feature/'
55
VERBOSITY: normal
66
GIT_SHA: $(Build.SourceVersion)

tests/Tests/SkiaSharp/GRContextTest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ public void ToGlSizedFormat()
5858
SKColorType.RgbaF32,
5959
SKColorType.Bgra1010102,
6060
SKColorType.Bgr101010x,
61-
SKColorType.Bgr101010xXR
61+
SKColorType.Bgr101010xXR,
62+
SKColorType.Rgba10x6,
6263
};
6364

6465
foreach (SKColorType value in Enum.GetValues(typeof(SKColorType)))

tests/Tests/SkiaSharp/SKBitmapTest.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ public void CopyWithAlphaToSucceeds(SKColorType colorType)
115115
// SRGB processing
116116
Assert.Equal((SKColor)0xAAFE0000, color);
117117
}
118+
else if (colorType == SKColorType.Rgba10x6)
119+
{
120+
// alpha % is included
121+
Assert.Equal((SKColor)0xAAAA0000, color);
122+
}
118123
else
119124
{
120125
Assert.Equal((SKColor)0xAAFF0000, color);

0 commit comments

Comments
 (0)