diff --git a/VERSIONS.txt b/VERSIONS.txt index a1fbdaf34..fbafd8579 100644 --- a/VERSIONS.txt +++ b/VERSIONS.txt @@ -1,5 +1,5 @@ # dependencies -mdoc release 5.7.4.10 +mdoc release 5.8.2 harfbuzz release 2.6.1 skia release m88 xunit release 2.4.1 @@ -19,8 +19,13 @@ GLibSharp release 3.22.24.37 AtkSharp release 3.22.24.37 System.Memory release 4.5.3 System.IO.UnmanagedMemoryStream release 4.3.0 +System.Drawing.Common release 4.5.1 SharpVk release 0.4.2 Uno.UI release 2.4.4 +Microsoft.ProjectReunion release 0.5.0 +Microsoft.ProjectReunion.Foundation release 0.5.0 +Microsoft.ProjectReunion.WinUI release 0.5.0 +Microsoft.Windows.SDK.NET.Ref release 10.0.18362.15 # additional references used by the tooling OpenTK.GLControl reference 1.1.2349.61993 @@ -61,6 +66,7 @@ SkiaSharp.Views.Forms nuget 2.88.0 SkiaSharp.Views.Forms.WPF nuget 2.88.0 SkiaSharp.Views.Forms.GTK nuget 2.88.0 SkiaSharp.Views.Uno nuget 2.88.0 +SkiaSharp.Views.WinUI nuget 2.88.0 SkiaSharp.HarfBuzz nuget 2.88.0 SkiaSharp.Vulkan.SharpVk nuget 2.88.0 HarfBuzzSharp nuget 2.6.1.8 diff --git a/binding/Binding/SkiaApi.cs b/binding/Binding/SkiaApi.cs index 79032a2d4..a9bad6216 100644 --- a/binding/Binding/SkiaApi.cs +++ b/binding/Binding/SkiaApi.cs @@ -4,20 +4,8 @@ namespace SkiaSharp { internal partial class SkiaApi { -#if __TVOS__ && __UNIFIED__ +#if __IOS__ || __TVOS__ || __WATCHOS__ private const string SKIA = "@rpath/libSkiaSharp.framework/libSkiaSharp"; -#elif __WATCHOS__ && __UNIFIED__ - private const string SKIA = "@rpath/libSkiaSharp.framework/libSkiaSharp"; -#elif __IOS__ && __UNIFIED__ - private const string SKIA = "@rpath/libSkiaSharp.framework/libSkiaSharp"; -#elif __ANDROID__ - private const string SKIA = "libSkiaSharp.so"; -#elif __MACOS__ - private const string SKIA = "libSkiaSharp.dylib"; -#elif WINDOWS_UWP - private const string SKIA = "libSkiaSharp.dll"; -#elif __TIZEN__ - private const string SKIA = "libSkiaSharp.so"; #else private const string SKIA = "libSkiaSharp"; #endif diff --git a/binding/HarfBuzzSharp.Shared/HarfBuzzApi.cs b/binding/HarfBuzzSharp.Shared/HarfBuzzApi.cs index 10b7cf9fd..f5675f7ec 100644 --- a/binding/HarfBuzzSharp.Shared/HarfBuzzApi.cs +++ b/binding/HarfBuzzSharp.Shared/HarfBuzzApi.cs @@ -4,22 +4,8 @@ namespace HarfBuzzSharp { internal unsafe partial class HarfBuzzApi { -#if __TVOS__ && __UNIFIED__ +#if __IOS__ || __TVOS__ || __WATCHOS__ private const string HARFBUZZ = "@rpath/libHarfBuzzSharp.framework/libHarfBuzzSharp"; -#elif __WATCHOS__ && __UNIFIED__ - private const string HARFBUZZ = "@rpath/libHarfBuzzSharp.framework/libHarfBuzzSharp"; -#elif __IOS__ && __UNIFIED__ - private const string HARFBUZZ = "@rpath/libHarfBuzzSharp.framework/libHarfBuzzSharp"; -#elif __ANDROID__ - private const string HARFBUZZ = "libHarfBuzzSharp.so"; -#elif __MACOS__ - private const string HARFBUZZ = "libHarfBuzzSharp.dylib"; -#elif __DESKTOP__ - private const string HARFBUZZ = "libHarfBuzzSharp"; -#elif WINDOWS_UWP - private const string HARFBUZZ = "libHarfBuzzSharp.dll"; -#elif NET_STANDARD - private const string HARFBUZZ = "libHarfBuzzSharp"; #else private const string HARFBUZZ = "libHarfBuzzSharp"; #endif diff --git a/binding/HarfBuzzSharp.Shared/HarfBuzzApi.generated.cs b/binding/HarfBuzzSharp.Shared/HarfBuzzApi.generated.cs index 0b9a28466..5f8ea45a2 100644 --- a/binding/HarfBuzzSharp.Shared/HarfBuzzApi.generated.cs +++ b/binding/HarfBuzzSharp.Shared/HarfBuzzApi.generated.cs @@ -5494,8 +5494,6 @@ namespace HarfBuzzSharp IdeoEmboxTopOrRight = 1768191088, // HB_OT_LAYOUT_BASELINE_TAG_MATH = 1835103336 Math = 1835103336, - // _HB_OT_LAYOUT_BASELINE_TAG_MAX_VALUE = 2147483647 - HbOtLayoutBaselineTagMaxValue = 2147483647, } // hb_ot_layout_glyph_class_t diff --git a/binding/HarfBuzzSharp.Shared/NativeObject.cs b/binding/HarfBuzzSharp.Shared/NativeObject.cs index f292f172c..a881a31c4 100644 --- a/binding/HarfBuzzSharp.Shared/NativeObject.cs +++ b/binding/HarfBuzzSharp.Shared/NativeObject.cs @@ -62,7 +62,7 @@ namespace HarfBuzzSharp internal static int SizeOf () { -#if WINDOWS_UWP || NET_STANDARD +#if WINDOWS_UWP || NETSTANDARD || NET5_0_OR_GREATER return Marshal.SizeOf (); #else return Marshal.SizeOf (typeof (T)); diff --git a/binding/HarfBuzzSharp.UWP/HarfBuzzSharp.UWP.csproj b/binding/HarfBuzzSharp.UWP/HarfBuzzSharp.UWP.csproj index e7a1a287b..2a3e5eed9 100644 --- a/binding/HarfBuzzSharp.UWP/HarfBuzzSharp.UWP.csproj +++ b/binding/HarfBuzzSharp.UWP/HarfBuzzSharp.UWP.csproj @@ -4,7 +4,7 @@ HarfBuzzSharp HarfBuzzSharp HarfBuzzSharp - $(DefineConstants);NET_STANDARD;HARFBUZZ + $(DefineConstants);HARFBUZZ diff --git a/binding/HarfBuzzSharp/HarfBuzzSharp.csproj b/binding/HarfBuzzSharp/HarfBuzzSharp.csproj index e7c1680e2..205022d17 100644 --- a/binding/HarfBuzzSharp/HarfBuzzSharp.csproj +++ b/binding/HarfBuzzSharp/HarfBuzzSharp.csproj @@ -6,11 +6,8 @@ HarfBuzzSharp $(DefineConstants);HARFBUZZ - - $(DefineConstants);NET_STANDARD - - $(DefineConstants);USE_DELEGATES;__DESKTOP__ + $(DefineConstants);USE_DELEGATES diff --git a/binding/SkiaSharp.UWP/SkiaSharp.UWP.csproj b/binding/SkiaSharp.UWP/SkiaSharp.UWP.csproj index 338b2a736..9895267c0 100644 --- a/binding/SkiaSharp.UWP/SkiaSharp.UWP.csproj +++ b/binding/SkiaSharp.UWP/SkiaSharp.UWP.csproj @@ -4,7 +4,6 @@ SkiaSharp SkiaSharp SkiaSharp - $(DefineConstants);NET_STANDARD diff --git a/binding/SkiaSharp/SkiaSharp.csproj b/binding/SkiaSharp/SkiaSharp.csproj index f3fc5f9b0..2d4142e02 100644 --- a/binding/SkiaSharp/SkiaSharp.csproj +++ b/binding/SkiaSharp/SkiaSharp.csproj @@ -5,11 +5,8 @@ SkiaSharp SkiaSharp - - $(DefineConstants);NET_STANDARD - - $(DefineConstants);USE_DELEGATES;__DESKTOP__ + $(DefineConstants);USE_DELEGATES diff --git a/build.cake b/build.cake index 2d6b8007a..1569e8420 100644 --- a/build.cake +++ b/build.cake @@ -6,7 +6,7 @@ #addin nuget:?package=Mono.ApiTools.NuGetDiff&version=1.3.2&loaddependencies=true #addin nuget:?package=Xamarin.Nuget.Validator&version=1.1.1 -#tool nuget:?package=mdoc&version=5.7.4.10 +#tool nuget:?package=mdoc&version=5.8.2 #tool nuget:?package=xunit.runner.console&version=2.4.1 #tool nuget:?package=vswhere&version=2.7.1 @@ -72,6 +72,7 @@ var TRACKED_NUGETS = new Dictionary { { "SkiaSharp.Views.Forms.WPF", new Version (1, 57, 0) }, { "SkiaSharp.Views.Forms.GTK", new Version (1, 57, 0) }, { "SkiaSharp.Views.Uno", new Version (1, 57, 0) }, + { "SkiaSharp.Views.WinUI", new Version (1, 57, 0) }, { "HarfBuzzSharp", new Version (1, 0, 0) }, { "HarfBuzzSharp.NativeAssets.Linux", new Version (1, 0, 0) }, { "HarfBuzzSharp.NativeAssets.WebAssembly", new Version (1, 0, 0) }, @@ -203,7 +204,6 @@ Task ("tests-netcore") CleanDirectories ($"{PACKAGE_CACHE_PATH}/harfbuzzsharp*"); // SkiaSharp.NetCore.Tests.csproj - RunMSBuild ("./tests/SkiaSharp.NetCore.Tests.sln"); try { RunNetCoreTests ("./tests/SkiaSharp.NetCore.Tests/SkiaSharp.NetCore.Tests.csproj"); } catch { @@ -386,6 +386,7 @@ Task ("samples") { "macos", isMac }, { "tvos", isMac }, { "uwp", isWin }, + { "winui", isWin }, { "watchos", isMac }, { "wpf", isWin }, }; @@ -394,6 +395,7 @@ Task ("samples") { "ios", "iPhone" }, { "tvos", "iPhoneSimulator" }, { "uwp", "x86" }, + { "winui", "x64" }, { "watchos", "iPhoneSimulator" }, { "xamarin.forms.mac", "iPhone" }, { "xamarin.forms.windows", "x86" }, diff --git a/cake/UtilsManaged.cake b/cake/UtilsManaged.cake index caa9e043e..bf098b802 100644 --- a/cake/UtilsManaged.cake +++ b/cake/UtilsManaged.cake @@ -147,22 +147,26 @@ IEnumerable<(DirectoryPath path, string platform)> GetPlatformDirectories(Direct // there were no cross-platform libraries, so process each platform foreach (var dir in platformDirs) { var d = dir.GetDirectoryName().ToLower(); - if (d.StartsWith("monoandroid")) + if (d.StartsWith("monoandroid") || (d.StartsWith("net") && d.Contains("-android"))) yield return (dir, "android"); else if (d.StartsWith("net4")) yield return (dir, "net"); else if (d.StartsWith("uap")) yield return (dir, "uwp"); - else if (d.StartsWith("xamarinios") || d.StartsWith("xamarin.ios")) + else if (d.StartsWith("xamarinios") || d.StartsWith("xamarin.ios") || (d.StartsWith("net") && d.Contains("-ios"))) yield return (dir, "ios"); - else if (d.StartsWith("xamarinmac") || d.StartsWith("xamarin.mac")) + else if (d.StartsWith("xamarinmac") || d.StartsWith("xamarin.mac") || (d.StartsWith("net") && d.Contains("-macos"))) yield return (dir, "macos"); - else if (d.StartsWith("xamarintvos") || d.StartsWith("xamarin.tvos")) + else if (d.StartsWith("xamarintvos") || d.StartsWith("xamarin.tvos") || (d.StartsWith("net") && d.Contains("-tvos"))) yield return (dir, "tvos"); - else if (d.StartsWith("xamarinwatchos") || d.StartsWith("xamarin.watchos")) + else if (d.StartsWith("xamarinwatchos") || d.StartsWith("xamarin.watchos") || (d.StartsWith("net") && d.Contains("-watchos"))) yield return (dir, "watchos"); - else if (d.StartsWith("tizen")) + else if (d.StartsWith("tizen") || (d.StartsWith("net") && d.Contains("-tizen"))) yield return (dir, "tizen"); + else if (d.StartsWith("net") && d.Contains("-windows")) + yield return (dir, "windows"); + else if (d.StartsWith("net") && d.Contains("-maccatalyst")) + yield return (dir, "maccatalyst"); else if (d.StartsWith("netcoreapp")) ; // skip this one for now else @@ -225,6 +229,9 @@ async Task CreateNuGetDiffAsync() await AddDep("Uno.UI", "xamarinios10"); await AddDep("Uno.UI", "xamarinmac20"); await AddDep("Uno.UI", "UAP"); + await AddDep("Microsoft.ProjectReunion.Foundation", "net5.0-windows"); + await AddDep("Microsoft.ProjectReunion.WinUI", "net5.0-windows10.0.18362.0"); + await AddDep("Microsoft.Windows.SDK.NET.Ref", ""); await AddDep("OpenTK.GLControl", "NET40", "reference"); await AddDep("Xamarin.Forms", "Xamarin.iOS10", "reference"); @@ -271,7 +278,7 @@ async Task DownloadPackageAsync(string id, DirectoryPath outputDirectory) { currentId = currentId.ToLower(); - Information($"Downloading: {currentId}..."); + Information($"Downloading '{currentId}' version '{currentVersion}'..."); var root = await comparer.ExtractCachedPackageAsync(currentId, currentVersion); var toolsDir = $"{root}/tools/"; diff --git a/changelogs/HarfBuzzSharp/2.6.1.8/HarfBuzzSharp.breaking.md b/changelogs/HarfBuzzSharp/2.6.1.8/HarfBuzzSharp.breaking.md new file mode 100644 index 000000000..74b9a24f8 --- /dev/null +++ b/changelogs/HarfBuzzSharp/2.6.1.8/HarfBuzzSharp.breaking.md @@ -0,0 +1,23 @@ +# API diff: HarfBuzzSharp.dll + +## HarfBuzzSharp.dll + +### Namespace HarfBuzzSharp + +#### Type Changed: HarfBuzzSharp.OpenTypeMetrics + +Modified base type: + +```diff +-System.ValueType ++System.Object +``` + +Removed constructor: + +```csharp +public OpenTypeMetrics (IntPtr font); +``` + + + diff --git a/changelogs/HarfBuzzSharp/2.6.1.8/HarfBuzzSharp.md b/changelogs/HarfBuzzSharp/2.6.1.8/HarfBuzzSharp.md new file mode 100644 index 000000000..4bdf09870 --- /dev/null +++ b/changelogs/HarfBuzzSharp/2.6.1.8/HarfBuzzSharp.md @@ -0,0 +1,442 @@ +# API diff: HarfBuzzSharp.dll + +## HarfBuzzSharp.dll + +### Namespace HarfBuzzSharp + +#### Type Changed: HarfBuzzSharp.Feature + +Added interface: + +```csharp +System.IEquatable +``` + +Added methods: + +```csharp +public virtual bool Equals (Feature obj); +public override bool Equals (object obj); +public override int GetHashCode (); +public static bool op_Equality (Feature left, Feature right); +public static bool op_Inequality (Feature left, Feature right); +``` + + +#### Type Changed: HarfBuzzSharp.FontExtents + +Added interface: + +```csharp +System.IEquatable +``` + +Added methods: + +```csharp +public virtual bool Equals (FontExtents obj); +public override bool Equals (object obj); +public override int GetHashCode (); +public static bool op_Equality (FontExtents left, FontExtents right); +public static bool op_Inequality (FontExtents left, FontExtents right); +``` + + +#### Type Changed: HarfBuzzSharp.GlyphExtents + +Added interface: + +```csharp +System.IEquatable +``` + +Added methods: + +```csharp +public virtual bool Equals (GlyphExtents obj); +public override bool Equals (object obj); +public override int GetHashCode (); +public static bool op_Equality (GlyphExtents left, GlyphExtents right); +public static bool op_Inequality (GlyphExtents left, GlyphExtents right); +``` + + +#### Type Changed: HarfBuzzSharp.GlyphInfo + +Added interface: + +```csharp +System.IEquatable +``` + +Added methods: + +```csharp +public virtual bool Equals (GlyphInfo obj); +public override bool Equals (object obj); +public override int GetHashCode (); +public static bool op_Equality (GlyphInfo left, GlyphInfo right); +public static bool op_Inequality (GlyphInfo left, GlyphInfo right); +``` + + +#### Type Changed: HarfBuzzSharp.GlyphPosition + +Added interface: + +```csharp +System.IEquatable +``` + +Added methods: + +```csharp +public virtual bool Equals (GlyphPosition obj); +public override bool Equals (object obj); +public override int GetHashCode (); +public static bool op_Equality (GlyphPosition left, GlyphPosition right); +public static bool op_Inequality (GlyphPosition left, GlyphPosition right); +``` + + +#### Type Changed: HarfBuzzSharp.OpenTypeMetrics + +Modified base type: + +```diff +-System.ValueType ++System.Object +``` + +Removed constructor: + +```csharp +public OpenTypeMetrics (IntPtr font); +``` + +Added constructor: + +```csharp +public OpenTypeMetrics (Font font); +``` + + +#### New Type: HarfBuzzSharp.BufferDiffFlags + +```csharp +[Serializable] +public enum BufferDiffFlags { + ClusterMismatch = 32, + CodepointMismatch = 16, + ContentTypeMismatch = 1, + DottedCirclePresent = 8, + Equal = 0, + GlyphFlagsMismatch = 64, + LengthMismatch = 2, + NotdefPresent = 4, + PositionMismatch = 128, +} +``` + +#### New Type: HarfBuzzSharp.OpenTypeColorLayer + +```csharp +public struct OpenTypeColorLayer, System.IEquatable { + // properties + public uint ColorIndex { get; set; } + public uint Glyph { get; set; } + // methods + public virtual bool Equals (OpenTypeColorLayer obj); + public override bool Equals (object obj); + public override int GetHashCode (); + public static bool op_Equality (OpenTypeColorLayer left, OpenTypeColorLayer right); + public static bool op_Inequality (OpenTypeColorLayer left, OpenTypeColorLayer right); +} +``` + +#### New Type: HarfBuzzSharp.OpenTypeColorPaletteFlags + +```csharp +[Serializable] +public enum OpenTypeColorPaletteFlags { + Default = 0, + UsableWithDarkBackground = 2, + UsableWithLightBackground = 1, +} +``` + +#### New Type: HarfBuzzSharp.OpenTypeLayoutBaselineTag + +```csharp +[Serializable] +public enum OpenTypeLayoutBaselineTag { + Hanging = 1751215719, + IdeoEmboxBottomOrLeft = 1768187247, + IdeoEmboxTopOrRight = 1768191088, + IdeoFaceBottomOrLeft = 1768121954, + IdeoFaceTopOrRight = 1768121972, + Math = 1835103336, + Roman = 1919905134, +} +``` + +#### New Type: HarfBuzzSharp.OpenTypeLayoutGlyphClass + +```csharp +[Serializable] +public enum OpenTypeLayoutGlyphClass { + BaseGlyph = 1, + Component = 4, + Ligature = 2, + Mark = 3, + Unclassified = 0, +} +``` + +#### New Type: HarfBuzzSharp.OpenTypeMathConstant + +```csharp +[Serializable] +public enum OpenTypeMathConstant { + AccentBaseHeight = 6, + AxisHeight = 5, + DelimitedSubFormulaMinHeight = 2, + DisplayOperatorMinHeight = 3, + FlattenedAccentBaseHeight = 7, + FractionDenomDisplayStyleGapMin = 40, + FractionDenominatorDisplayStyleShiftDown = 35, + FractionDenominatorGapMin = 39, + FractionDenominatorShiftDown = 34, + FractionNumDisplayStyleGapMin = 37, + FractionNumeratorDisplayStyleShiftUp = 33, + FractionNumeratorGapMin = 36, + FractionNumeratorShiftUp = 32, + FractionRuleThickness = 38, + LowerLimitBaselineDropMin = 21, + LowerLimitGapMin = 20, + MathLeading = 4, + OverbarExtraAscender = 45, + OverbarRuleThickness = 44, + OverbarVerticalGap = 43, + RadicalDegreeBottomRaisePercent = 55, + RadicalDisplayStyleVerticalGap = 50, + RadicalExtraAscender = 52, + RadicalKernAfterDegree = 54, + RadicalKernBeforeDegree = 53, + RadicalRuleThickness = 51, + RadicalVerticalGap = 49, + ScriptPercentScaleDown = 0, + ScriptScriptPercentScaleDown = 1, + SkewedFractionHorizontalGap = 41, + SkewedFractionVerticalGap = 42, + SpaceAfterScript = 17, + StackBottomDisplayStyleShiftDown = 25, + StackBottomShiftDown = 24, + StackDisplayStyleGapMin = 27, + StackGapMin = 26, + StackTopDisplayStyleShiftUp = 23, + StackTopShiftUp = 22, + StretchStackBottomShiftDown = 29, + StretchStackGapAboveMin = 30, + StretchStackGapBelowMin = 31, + StretchStackTopShiftUp = 28, + SubSuperscriptGapMin = 15, + SubscriptBaselineDropMin = 10, + SubscriptShiftDown = 8, + SubscriptTopMax = 9, + SuperscriptBaselineDropMax = 14, + SuperscriptBottomMaxWithSubscript = 16, + SuperscriptBottomMin = 13, + SuperscriptShiftUp = 11, + SuperscriptShiftUpCramped = 12, + UnderbarExtraDescender = 48, + UnderbarRuleThickness = 47, + UnderbarVerticalGap = 46, + UpperLimitBaselineRiseMin = 19, + UpperLimitGapMin = 18, +} +``` + +#### New Type: HarfBuzzSharp.OpenTypeMathGlyphPart + +```csharp +public struct OpenTypeMathGlyphPart, System.IEquatable { + // properties + public int EndConnectorLength { get; set; } + public OpenTypeMathGlyphPartFlags Flags { get; set; } + public int FullAdvance { get; set; } + public uint Glyph { get; set; } + public int StartConnectorLength { get; set; } + // methods + public virtual bool Equals (OpenTypeMathGlyphPart obj); + public override bool Equals (object obj); + public override int GetHashCode (); + public static bool op_Equality (OpenTypeMathGlyphPart left, OpenTypeMathGlyphPart right); + public static bool op_Inequality (OpenTypeMathGlyphPart left, OpenTypeMathGlyphPart right); +} +``` + +#### New Type: HarfBuzzSharp.OpenTypeMathGlyphPartFlags + +```csharp +[Serializable] +public enum OpenTypeMathGlyphPartFlags { + Extender = 1, +} +``` + +#### New Type: HarfBuzzSharp.OpenTypeMathGlyphVariant + +```csharp +public struct OpenTypeMathGlyphVariant, System.IEquatable { + // properties + public int Advance { get; set; } + public uint Glyph { get; set; } + // methods + public virtual bool Equals (OpenTypeMathGlyphVariant obj); + public override bool Equals (object obj); + public override int GetHashCode (); + public static bool op_Equality (OpenTypeMathGlyphVariant left, OpenTypeMathGlyphVariant right); + public static bool op_Inequality (OpenTypeMathGlyphVariant left, OpenTypeMathGlyphVariant right); +} +``` + +#### New Type: HarfBuzzSharp.OpenTypeMathKern + +```csharp +[Serializable] +public enum OpenTypeMathKern { + BottomLeft = 3, + BottomRight = 2, + TopLeft = 1, + TopRight = 0, +} +``` + +#### New Type: HarfBuzzSharp.OpenTypeMetaTag + +```csharp +[Serializable] +public enum OpenTypeMetaTag { + DesignLanguages = 1684827751, + SupportedLanguages = 1936485991, +} +``` + +#### New Type: HarfBuzzSharp.OpenTypeNameEntry + +```csharp +public struct OpenTypeNameEntry, System.IEquatable { + // properties + public IntPtr Language { get; set; } + public OpenTypeNameId NameId { get; set; } + public int Var { get; set; } + // methods + public virtual bool Equals (OpenTypeNameEntry obj); + public override bool Equals (object obj); + public override int GetHashCode (); + public static bool op_Equality (OpenTypeNameEntry left, OpenTypeNameEntry right); + public static bool op_Inequality (OpenTypeNameEntry left, OpenTypeNameEntry right); +} +``` + +#### New Type: HarfBuzzSharp.OpenTypeNameId + +```csharp +[Serializable] +public enum OpenTypeNameId { + CidFindFontName = 20, + Copyright = 0, + DarkBackground = 24, + Description = 10, + Designer = 9, + DesignerUrl = 12, + FontFamily = 1, + FontSubfamily = 2, + FullName = 4, + Invalid = 65535, + License = 13, + LicenseUrl = 14, + LightBackground = 23, + MacFullName = 18, + Manufacturer = 8, + PostscriptName = 6, + SampleText = 19, + Trademark = 7, + TypographicFamily = 16, + TypographicSubfamily = 17, + UniqueId = 3, + VariationsPostscriptPrefix = 25, + VendorUrl = 11, + VersionString = 5, + WwsFamily = 21, + WwsSubfamily = 22, +} +``` + +#### New Type: HarfBuzzSharp.OpenTypeVarAxis + +```csharp +public struct OpenTypeVarAxis, System.IEquatable { + // properties + public float DefaultValue { get; set; } + public float MaxValue { get; set; } + public float MinValue { get; set; } + public OpenTypeNameId NameId { get; set; } + public uint Tag { get; set; } + // methods + public virtual bool Equals (OpenTypeVarAxis obj); + public override bool Equals (object obj); + public override int GetHashCode (); + public static bool op_Equality (OpenTypeVarAxis left, OpenTypeVarAxis right); + public static bool op_Inequality (OpenTypeVarAxis left, OpenTypeVarAxis right); +} +``` + +#### New Type: HarfBuzzSharp.OpenTypeVarAxisFlags + +```csharp +[Serializable] +public enum OpenTypeVarAxisFlags { + Hidden = 1, +} +``` + +#### New Type: HarfBuzzSharp.OpenTypeVarAxisInfo + +```csharp +public struct OpenTypeVarAxisInfo, System.IEquatable { + // properties + public uint AxisIndex { get; set; } + public float DefaultValue { get; set; } + public OpenTypeVarAxisFlags Flags { get; set; } + public float MaxValue { get; set; } + public float MinValue { get; set; } + public OpenTypeNameId NameId { get; set; } + public uint Tag { get; set; } + // methods + public virtual bool Equals (OpenTypeVarAxisInfo obj); + public override bool Equals (object obj); + public override int GetHashCode (); + public static bool op_Equality (OpenTypeVarAxisInfo left, OpenTypeVarAxisInfo right); + public static bool op_Inequality (OpenTypeVarAxisInfo left, OpenTypeVarAxisInfo right); +} +``` + +#### New Type: HarfBuzzSharp.Variation + +```csharp +public struct Variation, System.IEquatable { + // properties + public uint Tag { get; set; } + public float Value { get; set; } + // methods + public virtual bool Equals (Variation obj); + public override bool Equals (object obj); + public override int GetHashCode (); + public static bool op_Equality (Variation left, Variation right); + public static bool op_Inequality (Variation left, Variation right); +} +``` + + diff --git a/changelogs/SkiaSharp.HarfBuzz/2.80.3/SkiaSharp.HarfBuzz.md b/changelogs/SkiaSharp.HarfBuzz/2.80.3/SkiaSharp.HarfBuzz.md new file mode 100644 index 000000000..9e2886165 --- /dev/null +++ b/changelogs/SkiaSharp.HarfBuzz/2.80.3/SkiaSharp.HarfBuzz.md @@ -0,0 +1,5 @@ +# API diff: SkiaSharp.HarfBuzz.dll + +## SkiaSharp.HarfBuzz.dll + +> No changes. diff --git a/changelogs/SkiaSharp.Views.Desktop.Common/2.80.3/SkiaSharp.Views.Desktop.Common.md b/changelogs/SkiaSharp.Views.Desktop.Common/2.80.3/SkiaSharp.Views.Desktop.Common.md new file mode 100644 index 000000000..4cae28970 --- /dev/null +++ b/changelogs/SkiaSharp.Views.Desktop.Common/2.80.3/SkiaSharp.Views.Desktop.Common.md @@ -0,0 +1,22 @@ +# API diff: SkiaSharp.Views.Desktop.Common.dll + +## SkiaSharp.Views.Desktop.Common.dll + +### Namespace SkiaSharp.Views.Desktop + +#### Type Changed: SkiaSharp.Views.Desktop.Extensions + +Added methods: + +```csharp +public static System.Drawing.Bitmap ToBitmap (this SkiaSharp.SKBitmap skiaBitmap); +public static System.Drawing.Bitmap ToBitmap (this SkiaSharp.SKImage skiaImage); +public static System.Drawing.Bitmap ToBitmap (this SkiaSharp.SKPixmap pixmap); +public static System.Drawing.Bitmap ToBitmap (this SkiaSharp.SKPicture picture, SkiaSharp.SKSizeI dimensions); +public static SkiaSharp.SKBitmap ToSKBitmap (this System.Drawing.Bitmap bitmap); +public static SkiaSharp.SKImage ToSKImage (this System.Drawing.Bitmap bitmap); +public static void ToSKPixmap (this System.Drawing.Bitmap bitmap, SkiaSharp.SKPixmap pixmap); +``` + + + diff --git a/changelogs/SkiaSharp.Views.Forms.GTK/2.80.3/SkiaSharp.Views.Forms.md b/changelogs/SkiaSharp.Views.Forms.GTK/2.80.3/SkiaSharp.Views.Forms.md new file mode 100644 index 000000000..5564a6718 --- /dev/null +++ b/changelogs/SkiaSharp.Views.Forms.GTK/2.80.3/SkiaSharp.Views.Forms.md @@ -0,0 +1,5 @@ +# API diff: SkiaSharp.Views.Forms.dll + +## SkiaSharp.Views.Forms.dll + +> No changes. diff --git a/changelogs/SkiaSharp.Views.Forms.WPF/2.80.3/SkiaSharp.Views.Forms.md b/changelogs/SkiaSharp.Views.Forms.WPF/2.80.3/SkiaSharp.Views.Forms.md new file mode 100644 index 000000000..5564a6718 --- /dev/null +++ b/changelogs/SkiaSharp.Views.Forms.WPF/2.80.3/SkiaSharp.Views.Forms.md @@ -0,0 +1,5 @@ +# API diff: SkiaSharp.Views.Forms.dll + +## SkiaSharp.Views.Forms.dll + +> No changes. diff --git a/changelogs/SkiaSharp.Views.Forms/2.80.3/SkiaSharp.Views.Forms.md b/changelogs/SkiaSharp.Views.Forms/2.80.3/SkiaSharp.Views.Forms.md new file mode 100644 index 000000000..5564a6718 --- /dev/null +++ b/changelogs/SkiaSharp.Views.Forms/2.80.3/SkiaSharp.Views.Forms.md @@ -0,0 +1,5 @@ +# API diff: SkiaSharp.Views.Forms.dll + +## SkiaSharp.Views.Forms.dll + +> No changes. diff --git a/changelogs/SkiaSharp.Views.Gtk2/2.80.3/SkiaSharp.Views.Gtk.md b/changelogs/SkiaSharp.Views.Gtk2/2.80.3/SkiaSharp.Views.Gtk.md new file mode 100644 index 000000000..62518e13a --- /dev/null +++ b/changelogs/SkiaSharp.Views.Gtk2/2.80.3/SkiaSharp.Views.Gtk.md @@ -0,0 +1,5 @@ +# API diff: SkiaSharp.Views.Gtk.dll + +## SkiaSharp.Views.Gtk.dll + +> No changes. diff --git a/changelogs/SkiaSharp.Views.Gtk3/2.80.3/SkiaSharp.Views.Gtk3.md b/changelogs/SkiaSharp.Views.Gtk3/2.80.3/SkiaSharp.Views.Gtk3.md new file mode 100644 index 000000000..cc4c1d9a5 --- /dev/null +++ b/changelogs/SkiaSharp.Views.Gtk3/2.80.3/SkiaSharp.Views.Gtk3.md @@ -0,0 +1,5 @@ +# API diff: SkiaSharp.Views.Gtk3.dll + +## SkiaSharp.Views.Gtk3.dll + +> No changes. diff --git a/changelogs/SkiaSharp.Views.Uno/2.80.3/SkiaSharp.Views.UWP.md b/changelogs/SkiaSharp.Views.Uno/2.80.3/SkiaSharp.Views.UWP.md new file mode 100644 index 000000000..164abbd42 --- /dev/null +++ b/changelogs/SkiaSharp.Views.Uno/2.80.3/SkiaSharp.Views.UWP.md @@ -0,0 +1,24 @@ +# API diff: SkiaSharp.Views.UWP.dll + +## SkiaSharp.Views.UWP.dll + +### Namespace SkiaSharp.Views.UWP + +#### Type Changed: SkiaSharp.Views.UWP.GlobalStaticResources + +Obsoleted methods: + +```diff + [Obsolete ("This method is provided for binary backward compatibility. It will always return null.")] + public static object FindResource (string name); +``` + +Added methods: + +```csharp +public static void RegisterDefaultStyles (); +public static void RegisterResourceDictionariesBySource (); +``` + + + diff --git a/changelogs/SkiaSharp.Views.WPF/2.80.3/SkiaSharp.Views.WPF.md b/changelogs/SkiaSharp.Views.WPF/2.80.3/SkiaSharp.Views.WPF.md new file mode 100644 index 000000000..0c21d2bfb --- /dev/null +++ b/changelogs/SkiaSharp.Views.WPF/2.80.3/SkiaSharp.Views.WPF.md @@ -0,0 +1,5 @@ +# API diff: SkiaSharp.Views.WPF.dll + +## SkiaSharp.Views.WPF.dll + +> No changes. diff --git a/changelogs/SkiaSharp.Views.WinUI/2.80.3/SkiaSharp.Views.Windows.md b/changelogs/SkiaSharp.Views.WinUI/2.80.3/SkiaSharp.Views.Windows.md new file mode 100644 index 000000000..f83ac96e0 --- /dev/null +++ b/changelogs/SkiaSharp.Views.WinUI/2.80.3/SkiaSharp.Views.Windows.md @@ -0,0 +1,103 @@ +# API diff: SkiaSharp.Views.Windows.dll + +## SkiaSharp.Views.Windows.dll + +> Assembly Version Changed: 2.80.0.0 vs 0.0.0.0 + +### New Namespace SkiaSharp.Views.Windows + +#### New Type: SkiaSharp.Views.Windows.Extensions + +```csharp +public static class Extensions { + // methods + public static System.Drawing.PointF ToDrawingPoint (this SkiaSharp.SKPoint point); + public static System.Drawing.Point ToDrawingPoint (this SkiaSharp.SKPointI point); + public static System.Drawing.RectangleF ToDrawingRect (this SkiaSharp.SKRect rect); + public static System.Drawing.Rectangle ToDrawingRect (this SkiaSharp.SKRectI rect); + public static System.Drawing.SizeF ToDrawingSize (this SkiaSharp.SKSize size); + public static System.Drawing.Size ToDrawingSize (this SkiaSharp.SKSizeI size); + public static SkiaSharp.SKPointI ToSKPoint (this System.Drawing.Point point); + public static SkiaSharp.SKPoint ToSKPoint (this System.Drawing.PointF point); + public static SkiaSharp.SKRectI ToSKRect (this System.Drawing.Rectangle rect); + public static SkiaSharp.SKRect ToSKRect (this System.Drawing.RectangleF rect); + public static SkiaSharp.SKSizeI ToSKSize (this System.Drawing.Size size); + public static SkiaSharp.SKSize ToSKSize (this System.Drawing.SizeF size); +} +``` + +#### New Type: SkiaSharp.Views.Windows.SKPaintGLSurfaceEventArgs + +```csharp +public class SKPaintGLSurfaceEventArgs : System.EventArgs { + // constructors + public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget); + + [Obsolete ("Use SKPaintGLSurfaceEventArgs(SKSurface, GRBackendRenderTarget, SKColorType, GRSurfaceOrigin) instead.")] +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTargetDesc renderTarget); + public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType); + public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.GRGlFramebufferInfo glInfo); + // properties + public SkiaSharp.GRBackendRenderTarget BackendRenderTarget { get; } + public SkiaSharp.SKColorType ColorType { get; } + public SkiaSharp.GRSurfaceOrigin Origin { get; } + + [Obsolete ("Use BackendRenderTarget instead.")] +public SkiaSharp.GRBackendRenderTargetDesc RenderTarget { get; } + public SkiaSharp.SKSurface Surface { get; } +} +``` + +#### New Type: SkiaSharp.Views.Windows.SKPaintSurfaceEventArgs + +```csharp +public class SKPaintSurfaceEventArgs : System.EventArgs { + // constructors + public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info); + // properties + public SkiaSharp.SKImageInfo Info { get; } + public SkiaSharp.SKSurface Surface { get; } +} +``` + +#### New Type: SkiaSharp.Views.Windows.SKXamlCanvas + +```csharp +public class SKXamlCanvas : Microsoft.UI.Xaml.Controls.Canvas, Microsoft.UI.Composition.IAnimationObject, Microsoft.UI.Composition.IVisualElement, Microsoft.UI.Composition.IVisualElement2, System.IEquatable, System.IEquatable, System.IEquatable, System.IEquatable, System.IEquatable, System.Runtime.InteropServices.ICustomQueryInterface, WinRT.IWinRTObject { + // constructors + public SKXamlCanvas (); + // properties + public SkiaSharp.SKSize CanvasSize { get; } + public double Dpi { get; } + public bool IgnorePixelScaling { get; set; } + // events + public event System.EventHandler PaintSurface; + // methods + public void Invalidate (); + protected virtual void OnPaintSurface (SKPaintSurfaceEventArgs e); +} +``` + +#### New Type: SkiaSharp.Views.Windows.WindowsExtensions + +```csharp +public static class WindowsExtensions { + // methods + public static Windows.UI.Color ToColor (this SkiaSharp.SKColor color); + public static Windows.Foundation.Point ToPoint (this SkiaSharp.SKPoint point); + public static Windows.Foundation.Rect ToRect (this SkiaSharp.SKRect rect); + public static SkiaSharp.SKBitmap ToSKBitmap (this Microsoft.UI.Xaml.Media.Imaging.WriteableBitmap bitmap); + public static SkiaSharp.SKColor ToSKColor (this Windows.UI.Color color); + public static SkiaSharp.SKImage ToSKImage (this Microsoft.UI.Xaml.Media.Imaging.WriteableBitmap bitmap); + public static bool ToSKPixmap (this Microsoft.UI.Xaml.Media.Imaging.WriteableBitmap bitmap, SkiaSharp.SKPixmap pixmap); + public static SkiaSharp.SKPoint ToSKPoint (this Windows.Foundation.Point point); + public static SkiaSharp.SKRect ToSKRect (this Windows.Foundation.Rect rect); + public static SkiaSharp.SKSize ToSKSize (this Windows.Foundation.Size size); + public static Windows.Foundation.Size ToSize (this SkiaSharp.SKSize size); + public static Microsoft.UI.Xaml.Media.Imaging.WriteableBitmap ToWriteableBitmap (this SkiaSharp.SKBitmap skiaBitmap); + public static Microsoft.UI.Xaml.Media.Imaging.WriteableBitmap ToWriteableBitmap (this SkiaSharp.SKImage skiaImage); + public static Microsoft.UI.Xaml.Media.Imaging.WriteableBitmap ToWriteableBitmap (this SkiaSharp.SKPixmap pixmap); + public static Microsoft.UI.Xaml.Media.Imaging.WriteableBitmap ToWriteableBitmap (this SkiaSharp.SKPicture picture, SkiaSharp.SKSizeI dimensions); +} +``` + diff --git a/changelogs/SkiaSharp.Views.WindowsForms/2.80.3/SkiaSharp.Views.WindowsForms.md b/changelogs/SkiaSharp.Views.WindowsForms/2.80.3/SkiaSharp.Views.WindowsForms.md new file mode 100644 index 000000000..7ac0b262f --- /dev/null +++ b/changelogs/SkiaSharp.Views.WindowsForms/2.80.3/SkiaSharp.Views.WindowsForms.md @@ -0,0 +1,5 @@ +# API diff: SkiaSharp.Views.WindowsForms.dll + +## SkiaSharp.Views.WindowsForms.dll + +> No changes. diff --git a/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.Android.md b/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.Android.md new file mode 100644 index 000000000..e369675b6 --- /dev/null +++ b/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.Android.md @@ -0,0 +1,16 @@ +# API diff: SkiaSharp.Views.Android.dll + +## SkiaSharp.Views.Android.dll + +### Namespace SkiaSharp.Views.Android + +#### Type Changed: SkiaSharp.Views.Android.SKCanvasView + +Added method: + +```csharp +protected override void OnAttachedToWindow (); +``` + + + diff --git a/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.Desktop.md b/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.Desktop.md new file mode 100644 index 000000000..9ffcfd2d1 --- /dev/null +++ b/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.Desktop.md @@ -0,0 +1,5 @@ +# API diff: SkiaSharp.Views.Desktop.dll + +## SkiaSharp.Views.Desktop.dll + +> No changes. diff --git a/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.Mac.md b/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.Mac.md new file mode 100644 index 000000000..1bc274432 --- /dev/null +++ b/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.Mac.md @@ -0,0 +1,42 @@ +# API diff: SkiaSharp.Views.Mac.dll + +## SkiaSharp.Views.Mac.dll + +### Namespace SkiaSharp.Views.Mac + +#### New Type: SkiaSharp.Views.Mac.SKMetalView + +```csharp +public class SKMetalView : MetalKit.MTKView, AppKit.INSAccessibility, AppKit.INSAccessibilityElementProtocol, AppKit.INSAppearanceCustomization, AppKit.INSDraggingDestination, AppKit.INSTouchBarProvider, AppKit.INSUserInterfaceItemIdentification, CoreAnimation.ICALayerDelegate, Foundation.INSCoding, Foundation.INSObjectProtocol, MetalKit.IMTKViewDelegate, ObjCRuntime.INativeObject, System.ComponentModel.IComponent, System.IDisposable, System.IEquatable { + // constructors + public SKMetalView (); + public SKMetalView (CoreGraphics.CGRect frame); + public SKMetalView (IntPtr p); + public SKMetalView (CoreGraphics.CGRect frame, Metal.IMTLDevice device); + // properties + public SkiaSharp.SKSize CanvasSize { get; } + public SkiaSharp.GRContext GRContext { get; } + // events + public event System.EventHandler PaintSurface; + // methods + public override void AwakeFromNib (); + protected virtual void OnPaintSurface (SKPaintMetalSurfaceEventArgs e); +} +``` + +#### New Type: SkiaSharp.Views.Mac.SKPaintMetalSurfaceEventArgs + +```csharp +public class SKPaintMetalSurfaceEventArgs : System.EventArgs { + // constructors + public SKPaintMetalSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget); + public SKPaintMetalSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType); + // properties + public SkiaSharp.GRBackendRenderTarget BackendRenderTarget { get; } + public SkiaSharp.SKColorType ColorType { get; } + public SkiaSharp.GRSurfaceOrigin Origin { get; } + public SkiaSharp.SKSurface Surface { get; } +} +``` + + diff --git a/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.Tizen.md b/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.Tizen.md new file mode 100644 index 000000000..576719cc5 --- /dev/null +++ b/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.Tizen.md @@ -0,0 +1,5 @@ +# API diff: SkiaSharp.Views.Tizen.dll + +## SkiaSharp.Views.Tizen.dll + +> No changes. diff --git a/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.UWP.md b/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.UWP.md new file mode 100644 index 000000000..65f4808e2 --- /dev/null +++ b/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.UWP.md @@ -0,0 +1,5 @@ +# API diff: SkiaSharp.Views.UWP.dll + +## SkiaSharp.Views.UWP.dll + +> No changes. diff --git a/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.iOS.md b/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.iOS.md new file mode 100644 index 000000000..cbf573f31 --- /dev/null +++ b/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.iOS.md @@ -0,0 +1,42 @@ +# API diff: SkiaSharp.Views.iOS.dll + +## SkiaSharp.Views.iOS.dll + +### Namespace SkiaSharp.Views.iOS + +#### New Type: SkiaSharp.Views.iOS.SKMetalView + +```csharp +public class SKMetalView : MetalKit.MTKView, CoreAnimation.ICALayerDelegate, Foundation.INSCoding, Foundation.INSObjectProtocol, MetalKit.IMTKViewDelegate, ObjCRuntime.INativeObject, System.Collections.IEnumerable, System.ComponentModel.IComponent, System.IDisposable, System.IEquatable, UIKit.IUIAccessibilityIdentification, UIKit.IUIAppearance, UIKit.IUIAppearanceContainer, UIKit.IUICoordinateSpace, UIKit.IUIDynamicItem, UIKit.IUIFocusEnvironment, UIKit.IUIFocusItem, UIKit.IUIFocusItemContainer, UIKit.IUILargeContentViewerItem, UIKit.IUIPasteConfigurationSupporting, UIKit.IUITraitEnvironment, UIKit.IUIUserActivityRestoring { + // constructors + public SKMetalView (); + public SKMetalView (CoreGraphics.CGRect frame); + public SKMetalView (IntPtr p); + public SKMetalView (CoreGraphics.CGRect frame, Metal.IMTLDevice device); + // properties + public SkiaSharp.SKSize CanvasSize { get; } + public SkiaSharp.GRContext GRContext { get; } + // events + public event System.EventHandler PaintSurface; + // methods + public override void AwakeFromNib (); + protected virtual void OnPaintSurface (SKPaintMetalSurfaceEventArgs e); +} +``` + +#### New Type: SkiaSharp.Views.iOS.SKPaintMetalSurfaceEventArgs + +```csharp +public class SKPaintMetalSurfaceEventArgs : System.EventArgs { + // constructors + public SKPaintMetalSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget); + public SKPaintMetalSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType); + // properties + public SkiaSharp.GRBackendRenderTarget BackendRenderTarget { get; } + public SkiaSharp.SKColorType ColorType { get; } + public SkiaSharp.GRSurfaceOrigin Origin { get; } + public SkiaSharp.SKSurface Surface { get; } +} +``` + + diff --git a/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.tvOS.md b/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.tvOS.md new file mode 100644 index 000000000..f8e47f50e --- /dev/null +++ b/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.tvOS.md @@ -0,0 +1,5 @@ +# API diff: SkiaSharp.Views.tvOS.dll + +## SkiaSharp.Views.tvOS.dll + +> No changes. diff --git a/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.watchOS.md b/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.watchOS.md new file mode 100644 index 000000000..2556d68a9 --- /dev/null +++ b/changelogs/SkiaSharp.Views/2.80.3/SkiaSharp.Views.watchOS.md @@ -0,0 +1,5 @@ +# API diff: SkiaSharp.Views.watchOS.dll + +## SkiaSharp.Views.watchOS.dll + +> No changes. diff --git a/changelogs/SkiaSharp.Vulkan.SharpVk/2.80.3/SkiaSharp.Vulkan.SharpVk.md b/changelogs/SkiaSharp.Vulkan.SharpVk/2.80.3/SkiaSharp.Vulkan.SharpVk.md new file mode 100644 index 000000000..ce2cf9898 --- /dev/null +++ b/changelogs/SkiaSharp.Vulkan.SharpVk/2.80.3/SkiaSharp.Vulkan.SharpVk.md @@ -0,0 +1,5 @@ +# API diff: SkiaSharp.Vulkan.SharpVk.dll + +## SkiaSharp.Vulkan.SharpVk.dll + +> No changes. diff --git a/changelogs/SkiaSharp/2.80.3/SkiaSharp.md b/changelogs/SkiaSharp/2.80.3/SkiaSharp.md new file mode 100644 index 000000000..ab09af6dc --- /dev/null +++ b/changelogs/SkiaSharp/2.80.3/SkiaSharp.md @@ -0,0 +1,100 @@ +# API diff: SkiaSharp.dll + +## SkiaSharp.dll + +### Namespace SkiaSharp + +#### Type Changed: SkiaSharp.GRContext + +Added property: + +```csharp +public bool IsAbandoned { get; } +``` + +Added methods: + +```csharp +public static GRContext CreateGl (GRContextOptions options); +public static GRContext CreateGl (GRGlInterface backendContext, GRContextOptions options); +public static GRContext CreateVulkan (GRVkBackendContext backendContext, GRContextOptions options); +``` + + +#### Type Changed: SkiaSharp.GRGlInterface + +Added method: + +```csharp +public static GRGlInterface CreateAngle (); +``` + + +#### Type Changed: SkiaSharp.SKData + +Added property: + +```csharp +public System.Span Span { get; } +``` + +Added methods: + +```csharp +public static SKData Create (long size); +public static SKData CreateCopy (IntPtr bytes, int length); +public static SKData CreateCopy (IntPtr bytes, long length); +``` + + +#### Type Changed: SkiaSharp.SKImage + +Added property: + +```csharp +public SKImageInfo Info { get; } +``` + + +#### Type Changed: SkiaSharp.SKPicture + +Added methods: + +```csharp +public static SKPicture Deserialize (SKData data); +public static SKPicture Deserialize (SKStream stream); +public static SKPicture Deserialize (System.IO.Stream stream); +public static SKPicture Deserialize (System.ReadOnlySpan data); +public static SKPicture Deserialize (IntPtr data, int length); +public SKData Serialize (); +public void Serialize (SKWStream stream); +public void Serialize (System.IO.Stream stream); +``` + + +#### Type Changed: SkiaSharp.SKSurface + +Added method: + +```csharp +public void Flush (); +``` + + +#### New Type: SkiaSharp.GRContextOptions + +```csharp +public class GRContextOptions { + // constructors + public GRContextOptions (); + // properties + public bool AllowPathMaskCaching { get; set; } + public bool AvoidStencilBuffers { get; set; } + public int BufferMapThreshold { get; set; } + public bool DoManualMipmapping { get; set; } + public int GlyphCacheTextureMaximumBytes { get; set; } + public int RuntimeProgramCacheSize { get; set; } +} +``` + + diff --git a/nuget/SkiaSharp.Views.Desktop.Common.nuspec b/nuget/SkiaSharp.Views.Desktop.Common.nuspec index a928724af..af668fc71 100644 --- a/nuget/SkiaSharp.Views.Desktop.Common.nuspec +++ b/nuget/SkiaSharp.Views.Desktop.Common.nuspec @@ -29,12 +29,15 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release + - + + + @@ -44,8 +47,8 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release - - + + diff --git a/nuget/SkiaSharp.Views.WPF.nuspec b/nuget/SkiaSharp.Views.WPF.nuspec index 3949fb9cf..43f1257a2 100644 --- a/nuget/SkiaSharp.Views.WPF.nuspec +++ b/nuget/SkiaSharp.Views.WPF.nuspec @@ -31,7 +31,7 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release - + @@ -41,8 +41,8 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release - - + + diff --git a/nuget/SkiaSharp.Views.WinUI.nuspec b/nuget/SkiaSharp.Views.WinUI.nuspec new file mode 100644 index 000000000..e6842a788 --- /dev/null +++ b/nuget/SkiaSharp.Views.WinUI.nuspec @@ -0,0 +1,47 @@ + + + + + + SkiaSharp.Views.WinUI + SkiaSharp Views & Layers for Windows (WinUI) + 1.0.0 + +SkiaSharp Views & Layers are a set of platform-specific views and containers that can be used to draw on the screen. + + +SkiaSharp Views & Layers are a set of platform-specific views and containers that can be used to draw on the screen. + + +Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release notes. + + https://go.microsoft.com/fwlink/?linkid=868515 + https://go.microsoft.com/fwlink/?linkid=2130524 + ui xamarin graphics ios android linux windows uwp tvos watchos macos tizen cross-platform skiasharp + + + https://go.microsoft.com/fwlink/?linkid=868514 + Microsoft + Microsoft + true + © Microsoft Corporation. All rights reserved. + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/nuget/SkiaSharp.Views.WindowsForms.nuspec b/nuget/SkiaSharp.Views.WindowsForms.nuspec index 305b7c924..8d53db080 100644 --- a/nuget/SkiaSharp.Views.WindowsForms.nuspec +++ b/nuget/SkiaSharp.Views.WindowsForms.nuspec @@ -33,7 +33,7 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release - + @@ -47,8 +47,8 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release - - + + diff --git a/samples/Basic/Desktop/SkiaSharpSample/SkiaSharpSample.csproj b/samples/Basic/Desktop/SkiaSharpSample/SkiaSharpSample.csproj index 995130cf1..eecb870b6 100644 --- a/samples/Basic/Desktop/SkiaSharpSample/SkiaSharpSample.csproj +++ b/samples/Basic/Desktop/SkiaSharpSample/SkiaSharpSample.csproj @@ -46,7 +46,6 @@ - diff --git a/samples/Basic/Gtk3/SkiaSharpSample/SkiaSharpSample.csproj b/samples/Basic/Gtk3/SkiaSharpSample/SkiaSharpSample.csproj index c745786e6..a76a3f730 100644 --- a/samples/Basic/Gtk3/SkiaSharpSample/SkiaSharpSample.csproj +++ b/samples/Basic/Gtk3/SkiaSharpSample/SkiaSharpSample.csproj @@ -2,7 +2,7 @@ WinExe - netcoreapp3.0 + netcoreapp3.1 8.0 diff --git a/samples/Basic/NetCore/Console/SkiaSharpSample/SkiaSharpSample.csproj b/samples/Basic/NetCore/Console/SkiaSharpSample/SkiaSharpSample.csproj index 64e7334f4..e9f16c2b8 100644 --- a/samples/Basic/NetCore/Console/SkiaSharpSample/SkiaSharpSample.csproj +++ b/samples/Basic/NetCore/Console/SkiaSharpSample/SkiaSharpSample.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.0 + netcoreapp3.1 8.0 diff --git a/samples/Basic/NetCore/WPF/SkiaSharpSample/SkiaSharpSample.csproj b/samples/Basic/NetCore/WPF/SkiaSharpSample/SkiaSharpSample.csproj index 7d0f8353b..44310b7c3 100644 --- a/samples/Basic/NetCore/WPF/SkiaSharpSample/SkiaSharpSample.csproj +++ b/samples/Basic/NetCore/WPF/SkiaSharpSample/SkiaSharpSample.csproj @@ -2,7 +2,7 @@ WinExe - netcoreapp3.0 + netcoreapp3.1 true 8.0 icon.ico diff --git a/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Images/LockScreenLogo.scale-200.png b/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Images/LockScreenLogo.scale-200.png new file mode 100644 index 000000000..735f57adb Binary files /dev/null and b/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Images/LockScreenLogo.scale-200.png differ diff --git a/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Images/SplashScreen.scale-200.png b/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Images/SplashScreen.scale-200.png new file mode 100644 index 000000000..023e7f1fe Binary files /dev/null and b/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Images/SplashScreen.scale-200.png differ diff --git a/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Images/Square150x150Logo.scale-200.png b/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Images/Square150x150Logo.scale-200.png new file mode 100644 index 000000000..af49fec1a Binary files /dev/null and b/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Images/Square150x150Logo.scale-200.png differ diff --git a/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Images/Square44x44Logo.scale-200.png b/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Images/Square44x44Logo.scale-200.png new file mode 100644 index 000000000..ce342a2ec Binary files /dev/null and b/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Images/Square44x44Logo.scale-200.png differ diff --git a/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Images/Square44x44Logo.targetsize-24_altform-unplated.png b/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Images/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 000000000..f6c02ce97 Binary files /dev/null and b/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Images/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Images/StoreLogo.png b/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Images/StoreLogo.png new file mode 100644 index 000000000..7385b56c0 Binary files /dev/null and b/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Images/StoreLogo.png differ diff --git a/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Images/Wide310x150Logo.scale-200.png b/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Images/Wide310x150Logo.scale-200.png new file mode 100644 index 000000000..288995b39 Binary files /dev/null and b/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Images/Wide310x150Logo.scale-200.png differ diff --git a/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Package.appxmanifest b/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Package.appxmanifest new file mode 100644 index 000000000..6a45ae632 --- /dev/null +++ b/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/Package.appxmanifest @@ -0,0 +1,48 @@ + + + + + + + + SkiaSharpSample + matthew + Images\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/SkiaSharpSample.Package.wapproj b/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/SkiaSharpSample.Package.wapproj new file mode 100644 index 000000000..85dcff5ab --- /dev/null +++ b/samples/Basic/WinUI/Desktop/SkiaSharpSample.Package/SkiaSharpSample.Package.wapproj @@ -0,0 +1,75 @@ + + + + 15.0 + + + + Debug + x86 + + + Release + x86 + + + Debug + x64 + + + Release + x64 + + + Debug + arm64 + + + Release + arm64 + + + + $(MSBuildExtensionsPath)\Microsoft\DesktopBridge\ + SkiaSharpSample\ + + + + bf0aea36-d579-49ee-a589-705d3d81feb1 + 10.0.19041.0 + 10.0.17763.0 + en-US + false + ..\SkiaSharpSample\SkiaSharpSample.csproj + net5.0-windows$(TargetPlatformVersion);$(AssetTargetFallback) + + + + Designer + + + + + + + + + + + + + + True + Properties\PublishProfiles\win10-$(Platform).pubxml + + + + + build + + + build + + + + \ No newline at end of file diff --git a/samples/Basic/WinUI/Desktop/SkiaSharpSample.sln b/samples/Basic/WinUI/Desktop/SkiaSharpSample.sln new file mode 100644 index 000000000..2995519ab --- /dev/null +++ b/samples/Basic/WinUI/Desktop/SkiaSharpSample.sln @@ -0,0 +1,107 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31025.218 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "SkiaSharpSample.Package", "SkiaSharpSample.Package\SkiaSharpSample.Package.wapproj", "{8287A10F-D119-4EBF-9CD7-1D697A476D6F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkiaSharpSample", "SkiaSharpSample\SkiaSharpSample.csproj", "{71668276-ECDD-49EC-9406-27A9D2676139}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkiaSharp", "..\..\..\..\binding\SkiaSharp\SkiaSharp.csproj", "{EA2AC287-6FEF-415D-BD33-01287DD11574}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkiaSharp.Views.WinUI", "..\..\..\..\source\SkiaSharp.Views.WinUI\SkiaSharp.Views.WinUI\SkiaSharp.Views.WinUI.csproj", "{B9E319D8-0A0E-471C-BD01-8015655FBD99}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|arm64 = Debug|arm64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|arm64 = Release|arm64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8287A10F-D119-4EBF-9CD7-1D697A476D6F}.Debug|Any CPU.ActiveCfg = Debug|x86 + {8287A10F-D119-4EBF-9CD7-1D697A476D6F}.Debug|arm64.ActiveCfg = Debug|arm64 + {8287A10F-D119-4EBF-9CD7-1D697A476D6F}.Debug|arm64.Build.0 = Debug|arm64 + {8287A10F-D119-4EBF-9CD7-1D697A476D6F}.Debug|arm64.Deploy.0 = Debug|arm64 + {8287A10F-D119-4EBF-9CD7-1D697A476D6F}.Debug|x64.ActiveCfg = Debug|x64 + {8287A10F-D119-4EBF-9CD7-1D697A476D6F}.Debug|x64.Build.0 = Debug|x64 + {8287A10F-D119-4EBF-9CD7-1D697A476D6F}.Debug|x64.Deploy.0 = Debug|x64 + {8287A10F-D119-4EBF-9CD7-1D697A476D6F}.Debug|x86.ActiveCfg = Debug|x86 + {8287A10F-D119-4EBF-9CD7-1D697A476D6F}.Debug|x86.Build.0 = Debug|x86 + {8287A10F-D119-4EBF-9CD7-1D697A476D6F}.Debug|x86.Deploy.0 = Debug|x86 + {8287A10F-D119-4EBF-9CD7-1D697A476D6F}.Release|Any CPU.ActiveCfg = Release|x86 + {8287A10F-D119-4EBF-9CD7-1D697A476D6F}.Release|arm64.ActiveCfg = Release|arm64 + {8287A10F-D119-4EBF-9CD7-1D697A476D6F}.Release|arm64.Build.0 = Release|arm64 + {8287A10F-D119-4EBF-9CD7-1D697A476D6F}.Release|arm64.Deploy.0 = Release|arm64 + {8287A10F-D119-4EBF-9CD7-1D697A476D6F}.Release|x64.ActiveCfg = Release|x64 + {8287A10F-D119-4EBF-9CD7-1D697A476D6F}.Release|x64.Build.0 = Release|x64 + {8287A10F-D119-4EBF-9CD7-1D697A476D6F}.Release|x64.Deploy.0 = Release|x64 + {8287A10F-D119-4EBF-9CD7-1D697A476D6F}.Release|x86.ActiveCfg = Release|x86 + {8287A10F-D119-4EBF-9CD7-1D697A476D6F}.Release|x86.Build.0 = Release|x86 + {8287A10F-D119-4EBF-9CD7-1D697A476D6F}.Release|x86.Deploy.0 = Release|x86 + {71668276-ECDD-49EC-9406-27A9D2676139}.Debug|Any CPU.ActiveCfg = Debug|x86 + {71668276-ECDD-49EC-9406-27A9D2676139}.Debug|arm64.ActiveCfg = Debug|arm64 + {71668276-ECDD-49EC-9406-27A9D2676139}.Debug|arm64.Build.0 = Debug|arm64 + {71668276-ECDD-49EC-9406-27A9D2676139}.Debug|x64.ActiveCfg = Debug|x64 + {71668276-ECDD-49EC-9406-27A9D2676139}.Debug|x64.Build.0 = Debug|x64 + {71668276-ECDD-49EC-9406-27A9D2676139}.Debug|x86.ActiveCfg = Debug|x86 + {71668276-ECDD-49EC-9406-27A9D2676139}.Debug|x86.Build.0 = Debug|x86 + {71668276-ECDD-49EC-9406-27A9D2676139}.Release|Any CPU.ActiveCfg = Release|x86 + {71668276-ECDD-49EC-9406-27A9D2676139}.Release|arm64.ActiveCfg = Release|arm64 + {71668276-ECDD-49EC-9406-27A9D2676139}.Release|arm64.Build.0 = Release|arm64 + {71668276-ECDD-49EC-9406-27A9D2676139}.Release|x64.ActiveCfg = Release|x64 + {71668276-ECDD-49EC-9406-27A9D2676139}.Release|x64.Build.0 = Release|x64 + {71668276-ECDD-49EC-9406-27A9D2676139}.Release|x86.ActiveCfg = Release|x86 + {71668276-ECDD-49EC-9406-27A9D2676139}.Release|x86.Build.0 = Release|x86 + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Debug|arm64.ActiveCfg = Debug|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Debug|arm64.Build.0 = Debug|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Debug|x64.ActiveCfg = Debug|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Debug|x64.Build.0 = Debug|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Debug|x86.ActiveCfg = Debug|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Debug|x86.Build.0 = Debug|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Release|Any CPU.Build.0 = Release|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Release|arm64.ActiveCfg = Release|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Release|arm64.Build.0 = Release|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Release|x64.ActiveCfg = Release|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Release|x64.Build.0 = Release|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Release|x86.ActiveCfg = Release|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Release|x86.Build.0 = Release|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|arm64.ActiveCfg = Debug|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|arm64.Build.0 = Debug|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|arm64.Deploy.0 = Debug|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|x64.ActiveCfg = Debug|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|x64.Build.0 = Debug|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|x64.Deploy.0 = Debug|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|x86.ActiveCfg = Debug|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|x86.Build.0 = Debug|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|x86.Deploy.0 = Debug|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|Any CPU.Build.0 = Release|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|Any CPU.Deploy.0 = Release|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|arm64.ActiveCfg = Release|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|arm64.Build.0 = Release|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|arm64.Deploy.0 = Release|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|x64.ActiveCfg = Release|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|x64.Build.0 = Release|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|x64.Deploy.0 = Release|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|x86.ActiveCfg = Release|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|x86.Build.0 = Release|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|x86.Deploy.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F5AABA3E-0272-4E88-A2B4-BD422E83400E} + EndGlobalSection +EndGlobal diff --git a/samples/Basic/WinUI/Desktop/SkiaSharpSample/App.xaml b/samples/Basic/WinUI/Desktop/SkiaSharpSample/App.xaml new file mode 100644 index 000000000..4ef7c6d3a --- /dev/null +++ b/samples/Basic/WinUI/Desktop/SkiaSharpSample/App.xaml @@ -0,0 +1,15 @@ + + + + + + + + + + + diff --git a/samples/Basic/WinUI/Desktop/SkiaSharpSample/App.xaml.cs b/samples/Basic/WinUI/Desktop/SkiaSharpSample/App.xaml.cs new file mode 100644 index 000000000..bd738d2ee --- /dev/null +++ b/samples/Basic/WinUI/Desktop/SkiaSharpSample/App.xaml.cs @@ -0,0 +1,20 @@ +using Microsoft.UI.Xaml; + +namespace SkiaSharpSample +{ + public partial class App : Application + { + private Window window; + + public App() + { + InitializeComponent(); + } + + protected override void OnLaunched(LaunchActivatedEventArgs args) + { + window = new MainWindow(); + window.Activate(); + } + } +} diff --git a/samples/Basic/WinUI/Desktop/SkiaSharpSample/MainWindow.xaml b/samples/Basic/WinUI/Desktop/SkiaSharpSample/MainWindow.xaml new file mode 100644 index 000000000..97823c096 --- /dev/null +++ b/samples/Basic/WinUI/Desktop/SkiaSharpSample/MainWindow.xaml @@ -0,0 +1,13 @@ + + + + + diff --git a/samples/Basic/WinUI/Desktop/SkiaSharpSample/MainWindow.xaml.cs b/samples/Basic/WinUI/Desktop/SkiaSharpSample/MainWindow.xaml.cs new file mode 100644 index 000000000..9a4d6f10f --- /dev/null +++ b/samples/Basic/WinUI/Desktop/SkiaSharpSample/MainWindow.xaml.cs @@ -0,0 +1,42 @@ +using Microsoft.UI.Xaml; +using SkiaSharp; +using SkiaSharp.Views.Windows; + +namespace SkiaSharpSample +{ + public sealed partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + + private void OnPaintSurface(object sender, SKPaintSurfaceEventArgs e) + { + // the the canvas and properties + var canvas = e.Surface.Canvas; + + // get the screen density for scaling + var scale = (float)((SKXamlCanvas)sender).XamlRoot.RasterizationScale; + var scaledSize = new SKSize(e.Info.Width / scale, e.Info.Height / scale); + + // handle the device screen density + canvas.Scale(scale); + + // make sure the canvas is blank + canvas.Clear(SKColors.White); + + // draw some text + var paint = new SKPaint + { + Color = SKColors.Black, + IsAntialias = true, + Style = SKPaintStyle.Fill, + TextAlign = SKTextAlign.Center, + TextSize = 24 + }; + var coord = new SKPoint(scaledSize.Width / 2, (scaledSize.Height + paint.TextSize) / 2); + canvas.DrawText("SkiaSharp", coord, paint); + } + } +} diff --git a/samples/Basic/WinUI/Desktop/SkiaSharpSample/SkiaSharpSample.csproj b/samples/Basic/WinUI/Desktop/SkiaSharpSample/SkiaSharpSample.csproj new file mode 100644 index 000000000..295bb0384 --- /dev/null +++ b/samples/Basic/WinUI/Desktop/SkiaSharpSample/SkiaSharpSample.csproj @@ -0,0 +1,29 @@ + + + + WinExe + net5.0-windows10.0.19041.0 + 10.0.17763.0 + SkiaSharpSample + app.manifest + x86;x64;arm64 + win10-x86;win10-x64;win10-arm64 + + + + + + + + + + + + + + + + + + + diff --git a/samples/Basic/WinUI/Desktop/SkiaSharpSample/app.manifest b/samples/Basic/WinUI/Desktop/SkiaSharpSample/app.manifest new file mode 100644 index 000000000..3b144ccbc --- /dev/null +++ b/samples/Basic/WinUI/Desktop/SkiaSharpSample/app.manifest @@ -0,0 +1,15 @@ + + + + + + + + true/PM + PerMonitorV2, PerMonitor + + + diff --git a/samples/Directory.Build.props b/samples/Directory.Build.props new file mode 100644 index 000000000..1789d43dc --- /dev/null +++ b/samples/Directory.Build.props @@ -0,0 +1,8 @@ + + + + + true + + + \ No newline at end of file diff --git a/samples/Directory.Build.targets b/samples/Directory.Build.targets new file mode 100644 index 000000000..148cf106a --- /dev/null +++ b/samples/Directory.Build.targets @@ -0,0 +1,12 @@ + + + + + + UAP + + + + \ No newline at end of file diff --git a/samples/Gallery/Xamarin.Forms/Core/Core.csproj b/samples/Gallery/Xamarin.Forms/Core/Core.csproj index 3b4851e80..6e4d3be4b 100644 --- a/samples/Gallery/Xamarin.Forms/Core/Core.csproj +++ b/samples/Gallery/Xamarin.Forms/Core/Core.csproj @@ -2,7 +2,6 @@ netstandard2.0 - $(DefineConstants);NET_STANDARD 8.0 diff --git a/scripts/azure-pipelines.yml b/scripts/azure-pipelines.yml index 12cf11b54..20e352517 100644 --- a/scripts/azure-pipelines.yml +++ b/scripts/azure-pipelines.yml @@ -20,10 +20,11 @@ variables: BUILD_NUMBER: $[counter(format('{0}_{1}_{2}', variables['SKIASHARP_VERSION'], variables['Build.SourceBranch'], variables['PREVIEW_LABEL']), 1)] TIZEN_LINUX_PACKAGES: libxcb-xfixes0 libxcb-render-util0 libwebkitgtk-1.0-0 libxcb-image0 acl libsdl1.2debian libv4l-0 libxcb-randr0 libxcb-shape0 libxcb-icccm4 libsm6 gettext rpm2cpio cpio bridge-utils openvpn MANAGED_LINUX_PACKAGES: ttf-ancient-fonts ninja-build - MONO_VERSION_MACOS: 'Latest' + MONO_VERSION_MACOS: '6_12_7' MONO_VERSION_LINUX: '' XCODE_VERSION: 12.4 - DOTNET_VERSION: 3.1.405 + DOTNET_VERSION_PREVIOUS: 3.1.408 + DOTNET_VERSION: 5.0.202 CONFIGURATION: 'Release' VM_IMAGE_WINDOWS: windows-2019 VM_IMAGE_WINDOWS_PREVIOUS: vs2017-win2016 diff --git a/scripts/azure-templates-bootstrapper.yml b/scripts/azure-templates-bootstrapper.yml index 2cd23e089..f030fbac9 100644 --- a/scripts/azure-templates-bootstrapper.yml +++ b/scripts/azure-templates-bootstrapper.yml @@ -99,6 +99,12 @@ jobs: # install extra bits for the manged builds - ${{ if not(startsWith(parameters.name, 'native_')) }}: + - task: UseDotNet@2 + inputs: + packageType: 'sdk' + version: $(DOTNET_VERSION_PREVIOUS) + performMultiLevelLookup: true + displayName: Install the previous version of .NET Core - task: UseDotNet@2 inputs: packageType: 'sdk' @@ -189,7 +195,7 @@ jobs: # publish artifacts - task: PublishBuildArtifacts@1 displayName: Publish the ${{ parameters.name }} artifacts - condition: ${{ parameters.shouldPublish }} + condition: or(${{ parameters.shouldPublish }}, failed()) inputs: artifactName: ${{ parameters.name }} pathToPublish: 'output' diff --git a/source/SkiaSharp.Build.props b/source/SkiaSharp.Build.props index 650ca08db..c0646a46c 100644 --- a/source/SkiaSharp.Build.props +++ b/source/SkiaSharp.Build.props @@ -13,7 +13,6 @@ true true $(MSBuildThisFileDirectory)..\docs\SkiaSharpAPI - False 8.0 @@ -31,10 +30,15 @@ true + + + true + + - true - true - true + $([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows))) + $([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX))) + $([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux))) + Condition=" !$(IsWindows) and !$(IsMacOS) and !$(IsLinux) " /> \ No newline at end of file diff --git a/source/SkiaSharp.Build.targets b/source/SkiaSharp.Build.targets index c66e99e18..e2fc8306a 100644 --- a/source/SkiaSharp.Build.targets +++ b/source/SkiaSharp.Build.targets @@ -14,7 +14,6 @@ mono.snk $(MSBuildThisFileDirectory)..\$(KeyFileName) - true $(GIT_SHA) $(GIT_COMMIT) @@ -25,6 +24,10 @@ false false false + false + false + false + false - VSX1000 + $(MSBuildWarningsAsMessages);VSX1000 - MSB9004 + $(MSBuildWarningsAsMessages);MSB9004 $(TargetFramework) - - - + + + + + + UAP + + + - - <_SignAssemblyDependsOn Condition=" '$(TypeRedirectorSkip)' == 'false'"> - _RedirectMovedTypes - + <_SignAssemblyAfterTargets> CoreCompile - + @@ -130,12 +140,14 @@ internal partial class VersionConstants { Verify that the output assembly is signed correctly for release. =================================================================================================================== --> - + <_SignAssemblyVerifyAfterTargets> Build - + @@ -195,17 +207,14 @@ internal partial class VersionConstants { This runs during the build phase. =================================================================================================================== --> - + CoreCompile - @(PackageReference -> '%(Version)') - @(PackageDefinitions -> '%(ResolvedPath)') - $(NuGetPackageRoot)\mdoc\$(MDocVersion) - $(MDocPackagePath)\tools\mdoc.exe + $(Pkgmdoc)\tools\mdoc.exe $(TargetName).xml $(TargetDir)$(MDocOutputName) $(IntermediateOutputPath)mdoc\ @@ -215,7 +224,7 @@ internal partial class VersionConstants { <_MDocInputs Include="$(MDocDocumentationDirectory)\**\*" /> - diff --git a/source/SkiaSharp.HarfBuzz/SkiaSharp.HarfBuzz/SkiaSharp.HarfBuzz.csproj b/source/SkiaSharp.HarfBuzz/SkiaSharp.HarfBuzz/SkiaSharp.HarfBuzz.csproj index c6a8b9d62..754c43f35 100644 --- a/source/SkiaSharp.HarfBuzz/SkiaSharp.HarfBuzz/SkiaSharp.HarfBuzz.csproj +++ b/source/SkiaSharp.HarfBuzz/SkiaSharp.HarfBuzz/SkiaSharp.HarfBuzz.csproj @@ -5,12 +5,6 @@ SkiaSharp.HarfBuzz SkiaSharp.HarfBuzz - - $(DefineConstants);NET_STANDARD - - - $(DefineConstants);__DESKTOP__ - diff --git a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.csproj b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.csproj index 3cccef58f..bac6c17e3 100644 --- a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.csproj +++ b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.csproj @@ -5,7 +5,6 @@ SkiaSharp.Views.Forms false SkiaSharp.Views.Forms - $(DefineConstants);NET_STANDARD diff --git a/source/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI/Interop/IBufferByteAccess.cs b/source/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI/Interop/IBufferByteAccess.cs new file mode 100644 index 000000000..b18a2b13e --- /dev/null +++ b/source/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI/Interop/IBufferByteAccess.cs @@ -0,0 +1,101 @@ +using System; +using System.Runtime.InteropServices; +using Windows.Storage.Streams; +using WinRT; +using WinRT.Interop; + +namespace SkiaSharp.Views.Windows +{ + [WindowsRuntimeType("Windows.Foundation.UniversalApiContract")] + [Guid("905a0fef-bc53-11df-8c49-001e4fc686da")] + internal interface IBufferByteAccess + { + IntPtr Buffer { get; } + } + + internal static class Utils + { + internal static IntPtr GetByteBuffer(this IBuffer buffer) + { + var byteBuffer = buffer.As(); + if (byteBuffer == null) + throw new InvalidCastException("Unable to convert WriteableBitmap.PixelBuffer to IBufferByteAccess."); + + return byteBuffer.Buffer; + } + } +} + +namespace ABI.SkiaSharp.Views.Windows +{ + [DynamicInterfaceCastableImplementation] + [Guid("905a0fef-bc53-11df-8c49-001e4fc686da")] + internal interface IBufferByteAccess : global::SkiaSharp.Views.Windows.IBufferByteAccess + { + public struct VftblPtr + { + public IntPtr Vftbl; + } + + [Guid("905a0fef-bc53-11df-8c49-001e4fc686da")] + public struct Vftbl + { + public delegate int GetBufferDelegate(IntPtr thisPtr, out IntPtr buffer); + + internal IUnknownVftbl IUnknownVftbl; + public GetBufferDelegate getBuffer; + + static unsafe Vftbl() + { + AbiToProjectionVftable = new Vftbl + { + IUnknownVftbl = IUnknownVftbl.AbiToProjectionVftbl, + getBuffer = DoAbiGetBuffer + }; + var nativeVftbl = (IntPtr*)Marshal.AllocCoTaskMem(Marshal.SizeOf() + sizeof(IntPtr) * 12); + Marshal.StructureToPtr(AbiToProjectionVftable.IUnknownVftbl, (IntPtr)nativeVftbl, false); + nativeVftbl[3] = Marshal.GetFunctionPointerForDelegate(AbiToProjectionVftable.getBuffer); + AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; + } + + public static readonly Vftbl AbiToProjectionVftable; + public static readonly IntPtr AbiToProjectionVftablePtr; + + internal unsafe Vftbl(IntPtr ptr) + { + var vftblPtr = Marshal.PtrToStructure(ptr); + var vftbl = (IntPtr*)vftblPtr.Vftbl; + IUnknownVftbl = Marshal.PtrToStructure(vftblPtr.Vftbl); + getBuffer = Marshal.GetDelegateForFunctionPointer(vftbl[3]); + } + + private static int DoAbiGetBuffer(IntPtr thisPtr, out IntPtr buffer) + { + buffer = default; + try + { + buffer = ComWrappersSupport.FindObject(thisPtr).Buffer; + } + catch (Exception ex) + { + return Marshal.GetHRForException(ex); + } + return 0; + } + } + + IntPtr global::SkiaSharp.Views.Windows.IBufferByteAccess.Buffer + { + get + { + var obj = (ObjectReference)((IWinRTObject)this).GetObjectReferenceForType(typeof(global::SkiaSharp.Views.Windows.IBufferByteAccess).TypeHandle); + var ThisPtr = obj.ThisPtr; + Marshal.ThrowExceptionForHR(obj.Vftbl.getBuffer(ThisPtr, out IntPtr buffer)); + return buffer; + } + } + + internal static ObjectReference FromAbi(IntPtr thisPtr) => + ObjectReference.FromAbi(thisPtr); + } +} diff --git a/source/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI.csproj b/source/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI.csproj new file mode 100644 index 000000000..a57297886 --- /dev/null +++ b/source/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI.csproj @@ -0,0 +1,20 @@ + + + net5.0-windows10.0.18362 + 10.0.17763.0 + SkiaSharp.Views.Windows + SkiaSharp.Views.Windows + SkiaSharp.Views.WinUI + + + + + + + + + + + + + \ No newline at end of file diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.Android/AndroidExtensions.cs b/source/SkiaSharp.Views/SkiaSharp.Views.Android/AndroidExtensions.cs index dc93136a4..465292e04 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.Android/AndroidExtensions.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.Android/AndroidExtensions.cs @@ -187,9 +187,9 @@ namespace SkiaSharp.Views.Android return bmp; } - public static Bitmap ToBitmap(this SKPixmap skiaPixamp) + public static Bitmap ToBitmap(this SKPixmap skiaPixmap) { - using (var image = SKImage.FromPixels(skiaPixamp)) + using (var image = SKImage.FromPixels(skiaPixmap)) { var bmp = image.ToBitmap(); return bmp; diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.Android/GLTextureView.cs b/source/SkiaSharp.Views/SkiaSharp.Views.Android/GLTextureView.cs index 98a11e644..40a79e7c8 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.Android/GLTextureView.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.Android/GLTextureView.cs @@ -1,4 +1,6 @@ -using System; +#pragma warning disable CS0618 + +using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; @@ -31,7 +33,7 @@ namespace SkiaSharp.Views.Android #endif partial class GLTextureView : TextureView, TextureView.ISurfaceTextureListener, View.IOnLayoutChangeListener { - private const bool EnableLogging = false; + internal static bool EnableLogging = false; private WeakReference thisWeakRef; private GLThread glThread; @@ -911,10 +913,10 @@ namespace SkiaSharp.Views.Android { eglHelper.Start(); } - catch (Exception t) + catch (Exception) { threadManager.ReleaseEglContextLocked(this); - throw t; + throw; } haveEglContext = true; createEglContext = true; diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.Desktop.Common/SkiaSharp.Views.Desktop.Common.csproj b/source/SkiaSharp.Views/SkiaSharp.Views.Desktop.Common/SkiaSharp.Views.Desktop.Common.csproj index 6c1a6c101..c9dad5d71 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.Desktop.Common/SkiaSharp.Views.Desktop.Common.csproj +++ b/source/SkiaSharp.Views/SkiaSharp.Views.Desktop.Common/SkiaSharp.Views.Desktop.Common.csproj @@ -1,14 +1,9 @@  - netstandard2.0;net462;netcoreapp3.0 + netstandard2.0;net462;netcoreapp3.1 SkiaSharp.Views.Desktop SkiaSharp.Views.Desktop.Common SkiaSharp.Views.Desktop.Common - - - $(DefineConstants);__DESKTOP__;NET_STANDARD - - $(DefineConstants);__DESKTOP__ @@ -17,7 +12,7 @@ - + \ No newline at end of file diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.Shared/Extensions.cs b/source/SkiaSharp.Views/SkiaSharp.Views.Shared/Extensions.cs index 5a5804862..d2f0dc528 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.Shared/Extensions.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.Shared/Extensions.cs @@ -1,4 +1,5 @@ using System; + #if WINDOWS_UWP || HAS_UNO namespace SkiaSharp.Views.UWP #elif __ANDROID__ @@ -15,6 +16,8 @@ namespace SkiaSharp.Views.Desktop namespace SkiaSharp.Views.Mac #elif __TIZEN__ namespace SkiaSharp.Views.Tizen +#elif WINDOWS +namespace SkiaSharp.Views.Windows #endif { public static class Extensions @@ -106,7 +109,7 @@ namespace SkiaSharp.Views.Tizen return new System.Drawing.Size(size.Width, size.Height); } -#if __DESKTOP__ && !NET_STANDARD +#if __DESKTOP__ // System.Drawing.Bitmap diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.Shared/GlesInterop/Gles.cs b/source/SkiaSharp.Views/SkiaSharp.Views.Shared/GlesInterop/Gles.cs index 78d65597d..0a860d9bd 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.Shared/GlesInterop/Gles.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.Shared/GlesInterop/Gles.cs @@ -13,7 +13,7 @@ namespace SkiaSharp.Views.GlesInterop private const string libGLESv2 = "opengl32.dll"; #elif __ANDROID__ private const string libGLESv2 = "libGLESv2.so"; -#elif WINDOWS_UWP +#elif WINDOWS_UWP || WINDOWS private const string libGLESv2 = "libGLESv2.dll"; #elif __TIZEN__ private const string libGLESv2 = "libGLESv2.so"; diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.Shared/SKPaintGLSurfaceEventArgs.cs b/source/SkiaSharp.Views/SkiaSharp.Views.Shared/SKPaintGLSurfaceEventArgs.cs index 027c75991..81620facd 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.Shared/SKPaintGLSurfaceEventArgs.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.Shared/SKPaintGLSurfaceEventArgs.cs @@ -16,6 +16,8 @@ namespace SkiaSharp.Views.Desktop namespace SkiaSharp.Views.Mac #elif __TIZEN__ namespace SkiaSharp.Views.Tizen +#elif WINDOWS +namespace SkiaSharp.Views.Windows #endif { public class SKPaintGLSurfaceEventArgs : EventArgs diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.Shared/SKPaintSurfaceEventArgs.cs b/source/SkiaSharp.Views/SkiaSharp.Views.Shared/SKPaintSurfaceEventArgs.cs index fbcab4f75..835ef31ff 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.Shared/SKPaintSurfaceEventArgs.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.Shared/SKPaintSurfaceEventArgs.cs @@ -16,6 +16,8 @@ namespace SkiaSharp.Views.Desktop namespace SkiaSharp.Views.Mac #elif __TIZEN__ namespace SkiaSharp.Views.Tizen +#elif WINDOWS +namespace SkiaSharp.Views.Windows #endif { public class SKPaintSurfaceEventArgs : EventArgs diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.UWP/AngleSwapChainPanel.cs b/source/SkiaSharp.Views/SkiaSharp.Views.UWP/AngleSwapChainPanel.cs index 77f5fad37..9491cae72 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.UWP/AngleSwapChainPanel.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.UWP/AngleSwapChainPanel.cs @@ -1,4 +1,6 @@ -using System; +#if !WINDOWS + +using System; using SkiaSharp.Views.GlesInterop; using Windows.ApplicationModel; using Windows.Foundation; @@ -8,7 +10,11 @@ using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Data; +#if WINDOWS +namespace SkiaSharp.Views.Windows +#else namespace SkiaSharp.Views.UWP +#endif { public class AngleSwapChainPanel : SwapChainPanel { @@ -293,3 +299,5 @@ namespace SkiaSharp.Views.UWP } } } + +#endif diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.UWP/GlesInterop/GlesContext.cs b/source/SkiaSharp.Views/SkiaSharp.Views.UWP/GlesInterop/GlesContext.cs index 45fb664ba..8acfaa520 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.UWP/GlesInterop/GlesContext.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.UWP/GlesInterop/GlesContext.cs @@ -1,10 +1,19 @@ using System; using Windows.Foundation; using Windows.Foundation.Collections; -using Windows.UI.Xaml.Controls; using System.Collections.Generic; -using SkiaSharp.Views.UWP.Interop; +#if WINDOWS +using Microsoft.UI.Xaml.Controls; +#else +using Windows.UI.Xaml.Controls; +#endif + +#if WINDOWS +using SkiaSharp.Views.Windows; +#else +using SkiaSharp.Views.UWP; +#endif using EGLDisplay = System.IntPtr; using EGLContext = System.IntPtr; diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.UWP/Interop/IBufferByteAccess.cs b/source/SkiaSharp.Views/SkiaSharp.Views.UWP/Interop/IBufferByteAccess.cs index c16825f5b..11e6ff181 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.UWP/Interop/IBufferByteAccess.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.UWP/Interop/IBufferByteAccess.cs @@ -1,7 +1,8 @@ using System; using System.Runtime.InteropServices; +using Windows.Storage.Streams; -namespace SkiaSharp.Views.UWP.Interop +namespace SkiaSharp.Views.UWP { [ComImport] [Guid("905a0fef-bc53-11df-8c49-001e4fc686da")] @@ -10,4 +11,20 @@ namespace SkiaSharp.Views.UWP.Interop { long Buffer([Out] out IntPtr value); } + + internal static class Utils + { + internal static IntPtr GetByteBuffer(this IBuffer buffer) + { + var byteBuffer = buffer as IBufferByteAccess; + if (byteBuffer == null) + throw new InvalidCastException("Unable to convert WriteableBitmap.PixelBuffer to IBufferByteAccess."); + + var hr = byteBuffer.Buffer(out var ptr); + if (hr < 0) + throw new InvalidCastException("Unable to retrieve pixel address from WriteableBitmap.PixelBuffer."); + + return ptr; + } + } } diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.UWP/Interop/PropertySetExtensions.cs b/source/SkiaSharp.Views/SkiaSharp.Views.UWP/Interop/PropertySetExtensions.cs index f4a74e7a0..6b4ef5003 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.UWP/Interop/PropertySetExtensions.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.UWP/Interop/PropertySetExtensions.cs @@ -2,7 +2,11 @@ using Windows.Foundation; using Windows.Foundation.Collections; -namespace SkiaSharp.Views.UWP.Interop +#if WINDOWS +namespace SkiaSharp.Views.Windows +#else +namespace SkiaSharp.Views.UWP +#endif { internal static class PropertySetExtensions { diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.UWP/SKSwapChainPanel.cs b/source/SkiaSharp.Views/SkiaSharp.Views.UWP/SKSwapChainPanel.cs index 213a02208..e2ef5a63f 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.UWP/SKSwapChainPanel.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.UWP/SKSwapChainPanel.cs @@ -1,8 +1,14 @@ -using System; +#if !WINDOWS + +using System; using SkiaSharp.Views.GlesInterop; using Windows.Foundation; +#if WINDOWS +namespace SkiaSharp.Views.Windows +#else namespace SkiaSharp.Views.UWP +#endif { public class SKSwapChainPanel : AngleSwapChainPanel { @@ -119,3 +125,5 @@ namespace SkiaSharp.Views.UWP } } } + +#endif diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.UWP/SKXamlCanvas.cs b/source/SkiaSharp.Views/SkiaSharp.Views.UWP/SKXamlCanvas.cs index 67a9eba7d..c18dc5434 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.UWP/SKXamlCanvas.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.UWP/SKXamlCanvas.cs @@ -1,14 +1,28 @@ using System; using Windows.ApplicationModel; using Windows.Graphics.Display; + +#if WINDOWS +using Microsoft.System; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Media.Imaging; +#else using Windows.UI.Core; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Media.Imaging; +#endif +#if WINDOWS +namespace SkiaSharp.Views.Windows +#else namespace SkiaSharp.Views.UWP +#endif { public partial class SKXamlCanvas : Canvas { @@ -34,8 +48,10 @@ namespace SkiaSharp.Views.UWP if (designMode) return; +#if !WINDOWS var display = DisplayInformation.GetForCurrentView(); OnDpiChanged(display); +#endif Loaded += OnLoaded; Unloaded += OnUnloaded; @@ -79,11 +95,20 @@ namespace SkiaSharp.Views.UWP } } +#if WINDOWS + private void OnXamlRootChanged(XamlRoot xamlRoot = null, XamlRootChangedEventArgs e = null) + { + var root = xamlRoot ?? XamlRoot; + Dpi = root.RasterizationScale; + Invalidate(); + } +#else private void OnDpiChanged(DisplayInformation sender, object args = null) { Dpi = sender.LogicalDpi / 96.0f; Invalidate(); } +#endif private void OnSizeChanged(object sender, SizeChangedEventArgs e) { @@ -96,10 +121,15 @@ namespace SkiaSharp.Views.UWP if (loadUnloadCounter != 1) return; +#if WINDOWS + XamlRoot.Changed += OnXamlRootChanged; + OnXamlRootChanged(); +#else var display = DisplayInformation.GetForCurrentView(); display.DpiChanged += OnDpiChanged; OnDpiChanged(display); +#endif } private void OnUnloaded(object sender, RoutedEventArgs e) @@ -108,15 +138,23 @@ namespace SkiaSharp.Views.UWP if (loadUnloadCounter != 0) return; +#if WINDOWS + XamlRoot.Changed -= OnXamlRootChanged; +#else var display = DisplayInformation.GetForCurrentView(); display.DpiChanged -= OnDpiChanged; +#endif FreeBitmap(); } public void Invalidate() { +#if WINDOWS + DispatcherQueue.TryEnqueue(DispatcherQueuePriority.Normal, DoInvalidate); +#else Dispatcher.RunAsync(CoreDispatcherPriority.Normal, DoInvalidate); +#endif } private void DoInvalidate() diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.UWP/UWPExtensions.cs b/source/SkiaSharp.Views/SkiaSharp.Views.UWP/UWPExtensions.cs index dff9bc39f..6518013b3 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.UWP/UWPExtensions.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.UWP/UWPExtensions.cs @@ -1,15 +1,24 @@ using System; using Windows.Foundation; using Windows.UI; -using Windows.UI.Xaml.Media.Imaging; -#if !HAS_UNO -using SkiaSharp.Views.UWP.Interop; +#if WINDOWS +using Microsoft.UI.Xaml.Media.Imaging; +#else +using Windows.UI.Xaml.Media.Imaging; #endif +#if WINDOWS +namespace SkiaSharp.Views.Windows +#else namespace SkiaSharp.Views.UWP +#endif { +#if WINDOWS + public static class WindowsExtensions +#else public static class UWPExtensions +#endif { // Point @@ -164,19 +173,8 @@ namespace SkiaSharp.Views.UWP } } - internal static IntPtr GetPixels(this WriteableBitmap bitmap) - { - var buffer = bitmap.PixelBuffer as IBufferByteAccess; - if (buffer == null) - throw new InvalidCastException("Unable to convert WriteableBitmap.PixelBuffer to IBufferByteAccess."); - - IntPtr ptr; - var hr = buffer.Buffer(out ptr); - if (hr < 0) - throw new InvalidCastException("Unable to retrieve pixel address from WriteableBitmap.PixelBuffer."); - - return ptr; - } + internal static IntPtr GetPixels(this WriteableBitmap bitmap) => + bitmap.PixelBuffer.GetByteBuffer(); #endif } } diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.WPF/SkiaSharp.Views.WPF.csproj b/source/SkiaSharp.Views/SkiaSharp.Views.WPF/SkiaSharp.Views.WPF.csproj index ab5c6b34c..cb1f84f2b 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.WPF/SkiaSharp.Views.WPF.csproj +++ b/source/SkiaSharp.Views/SkiaSharp.Views.WPF/SkiaSharp.Views.WPF.csproj @@ -1,6 +1,6 @@  - net462;netcoreapp3.0 + net462;netcoreapp3.1 true SkiaSharp.Views.WPF SkiaSharp.Views.WPF diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.WindowsForms/SkiaSharp.Views.WindowsForms.csproj b/source/SkiaSharp.Views/SkiaSharp.Views.WindowsForms/SkiaSharp.Views.WindowsForms.csproj index b838764db..80fcd785c 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.WindowsForms/SkiaSharp.Views.WindowsForms.csproj +++ b/source/SkiaSharp.Views/SkiaSharp.Views.WindowsForms/SkiaSharp.Views.WindowsForms.csproj @@ -1,6 +1,6 @@  - net462;netcoreapp3.0 + net462;netcoreapp3.1 true SkiaSharp.Views.Desktop SkiaSharp.Views.WindowsForms diff --git a/source/SkiaSharp.Vulkan/SkiaSharp.Vulkan.SharpVk/SkiaSharp.Vulkan.SharpVk.csproj b/source/SkiaSharp.Vulkan/SkiaSharp.Vulkan.SharpVk/SkiaSharp.Vulkan.SharpVk.csproj index 8d8d06790..6b3084710 100644 --- a/source/SkiaSharp.Vulkan/SkiaSharp.Vulkan.SharpVk/SkiaSharp.Vulkan.SharpVk.csproj +++ b/source/SkiaSharp.Vulkan/SkiaSharp.Vulkan.SharpVk/SkiaSharp.Vulkan.SharpVk.csproj @@ -5,7 +5,6 @@ SkiaSharp.Vulkan.SharpVk false SkiaSharp.Vulkan.SharpVk - $(DefineConstants);NET_STANDARD diff --git a/source/SkiaSharpSource.Windows.sln b/source/SkiaSharpSource.Windows.sln index df032e24c..8e463eebe 100644 --- a/source/SkiaSharpSource.Windows.sln +++ b/source/SkiaSharpSource.Windows.sln @@ -69,6 +69,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkiaSharp.Views.Uno.Wasm", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkiaSharp.Views.Uno.Reference", "SkiaSharp.Views.Uno\SkiaSharp.Views.Uno.Reference\SkiaSharp.Views.Uno.Reference.csproj", "{D5C7D157-609E-4D64-8E42-C1DB0FAA86EB}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkiaSharp.Views.WinUI", "SkiaSharp.Views.WinUI\SkiaSharp.Views.WinUI\SkiaSharp.Views.WinUI.csproj", "{F50AE765-D9B9-4025-88A8-E8B080D5D624}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SkiaSharp.Views.WinUI", "SkiaSharp.Views.WinUI", "{32AE56A0-F3E1-4721-9BED-B1F609DEA8E8}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -179,6 +183,10 @@ Global {D5C7D157-609E-4D64-8E42-C1DB0FAA86EB}.Debug|Any CPU.Build.0 = Debug|Any CPU {D5C7D157-609E-4D64-8E42-C1DB0FAA86EB}.Release|Any CPU.ActiveCfg = Release|Any CPU {D5C7D157-609E-4D64-8E42-C1DB0FAA86EB}.Release|Any CPU.Build.0 = Release|Any CPU + {F50AE765-D9B9-4025-88A8-E8B080D5D624}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F50AE765-D9B9-4025-88A8-E8B080D5D624}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F50AE765-D9B9-4025-88A8-E8B080D5D624}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F50AE765-D9B9-4025-88A8-E8B080D5D624}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -210,6 +218,7 @@ Global {D35B20BC-838A-4C1E-B427-4269F6387CAB} = {E53351EA-FE40-47D2-B388-4A75DA6CCD71} {F675A841-ECDB-4571-8AA3-7D4642FD57DB} = {E53351EA-FE40-47D2-B388-4A75DA6CCD71} {D5C7D157-609E-4D64-8E42-C1DB0FAA86EB} = {E53351EA-FE40-47D2-B388-4A75DA6CCD71} + {F50AE765-D9B9-4025-88A8-E8B080D5D624} = {32AE56A0-F3E1-4721-9BED-B1F609DEA8E8} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {63A8C36E-4917-46DB-9AAD-522B8EC00C23} diff --git a/source/SkiaSharpSource.sln b/source/SkiaSharpSource.sln index 853ecbfc2..af4848986 100644 --- a/source/SkiaSharpSource.sln +++ b/source/SkiaSharpSource.sln @@ -105,6 +105,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkiaSharp.Views.Uno.Wasm", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkiaSharp.Views.Uno.Reference", "SkiaSharp.Views.Uno\SkiaSharp.Views.Uno.Reference\SkiaSharp.Views.Uno.Reference.csproj", "{D5C7D157-609E-4D64-8E42-C1DB0FAA86EB}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SkiaSharp.Views.WinUI", "SkiaSharp.Views.WinUI", "{6430EC5F-EDA1-4202-AB7B-22ED0496E016}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkiaSharp.Views.WinUI", "SkiaSharp.Views.WinUI\SkiaSharp.Views.WinUI\SkiaSharp.Views.WinUI.csproj", "{02CA4107-1FC6-4676-B284-9981694A450E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -287,6 +291,10 @@ Global {D5C7D157-609E-4D64-8E42-C1DB0FAA86EB}.Debug|Any CPU.Build.0 = Debug|Any CPU {D5C7D157-609E-4D64-8E42-C1DB0FAA86EB}.Release|Any CPU.ActiveCfg = Release|Any CPU {D5C7D157-609E-4D64-8E42-C1DB0FAA86EB}.Release|Any CPU.Build.0 = Release|Any CPU + {02CA4107-1FC6-4676-B284-9981694A450E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {02CA4107-1FC6-4676-B284-9981694A450E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {02CA4107-1FC6-4676-B284-9981694A450E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {02CA4107-1FC6-4676-B284-9981694A450E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -336,6 +344,7 @@ Global {E0FF9BFF-2253-4486-A8E2-94312D09D056} = {E53351EA-FE40-47D2-B388-4A75DA6CCD71} {047C460D-7470-418C-AF2C-30620A1AF61C} = {E53351EA-FE40-47D2-B388-4A75DA6CCD71} {D5C7D157-609E-4D64-8E42-C1DB0FAA86EB} = {E53351EA-FE40-47D2-B388-4A75DA6CCD71} + {02CA4107-1FC6-4676-B284-9981694A450E} = {6430EC5F-EDA1-4202-AB7B-22ED0496E016} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {67EACD19-0CEA-4127-9842-549AA6FB84C9} diff --git a/tests/SkiaSharp.NetCore.Tests/SkiaSharp.NetCore.Tests.csproj b/tests/SkiaSharp.NetCore.Tests/SkiaSharp.NetCore.Tests.csproj index c83e26bd8..99f1c9d41 100644 --- a/tests/SkiaSharp.NetCore.Tests/SkiaSharp.NetCore.Tests.csproj +++ b/tests/SkiaSharp.NetCore.Tests/SkiaSharp.NetCore.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 - $(DefineConstants);NET_STANDARD;USE_LIBRARY_LOADER + netcoreapp3.1 + $(DefineConstants);USE_LIBRARY_LOADER SkiaSharp.Tests SkiaSharp.Tests true @@ -13,7 +13,7 @@ - + diff --git a/tests/SkiaSharp.Vulkan.NetCore.Tests/SkiaSharp.Vulkan.NetCore.Tests.csproj b/tests/SkiaSharp.Vulkan.NetCore.Tests/SkiaSharp.Vulkan.NetCore.Tests.csproj index 683315f5d..519741c23 100644 --- a/tests/SkiaSharp.Vulkan.NetCore.Tests/SkiaSharp.Vulkan.NetCore.Tests.csproj +++ b/tests/SkiaSharp.Vulkan.NetCore.Tests/SkiaSharp.Vulkan.NetCore.Tests.csproj @@ -1,7 +1,6 @@  - netcoreapp3.0 - $(DefineConstants);NET_STANDARD + netcoreapp3.1 SkiaSharp.Vulkan.Tests SkiaSharp.Vulkan.Tests false @@ -16,7 +15,7 @@ - + diff --git a/tests/Tests/BaseTest.cs b/tests/Tests/BaseTest.cs index c1794c85c..acc04167c 100644 --- a/tests/Tests/BaseTest.cs +++ b/tests/Tests/BaseTest.cs @@ -36,7 +36,7 @@ namespace SkiaSharp.Tests PathToImages = Path.Combine(PathToAssembly, "images"); // some platforms run the tests from a temporary location, so copy the native files -#if !NET_STANDARD && !__ANDROID__ && !__IOS__ +#if !NETCOREAPP && !__ANDROID__ && !__IOS__ var skiaRoot = Path.GetDirectoryName(typeof(SkiaSharp.SKImageInfo).Assembly.Location); var harfRoot = Path.GetDirectoryName(typeof(HarfBuzzSharp.Buffer).Assembly.Location); diff --git a/utils/SkiaSharpGenerator/SkiaSharpGenerator.csproj b/utils/SkiaSharpGenerator/SkiaSharpGenerator.csproj index 943d7a7a4..321b6d206 100644 --- a/utils/SkiaSharpGenerator/SkiaSharpGenerator.csproj +++ b/utils/SkiaSharpGenerator/SkiaSharpGenerator.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.0 + netcoreapp3.1 enable diff --git a/utils/WasmTestRunner/WasmTestRunner.csproj b/utils/WasmTestRunner/WasmTestRunner.csproj index d98b3880a..fbe142188 100644 --- a/utils/WasmTestRunner/WasmTestRunner.csproj +++ b/utils/WasmTestRunner/WasmTestRunner.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.0 + netcoreapp3.1 8.0 wasm-test