diff --git a/VERSIONS.txt b/VERSIONS.txt index fd24bffcf8d..bfcedd2af3d 100644 --- a/VERSIONS.txt +++ b/VERSIONS.txt @@ -1,5 +1,5 @@ # dependencies -mdoc release 5.8.3 +mdoc release 5.8.9 harfbuzz release 2.8.2 skia release m88 xunit release 2.4.1 diff --git a/build.cake b/build.cake index 2ffd9524de2..7710196faf5 100644 --- a/build.cake +++ b/build.cake @@ -9,7 +9,7 @@ #addin nuget:?package=Mono.ApiTools.NuGetDiff&version=1.3.2 #addin nuget:?package=Xamarin.Nuget.Validator&version=1.1.1 -#tool nuget:?package=mdoc&version=5.8.3 +#tool nuget:?package=mdoc&version=5.8.9 #tool nuget:?package=xunit.runner.console&version=2.4.1 #tool nuget:?package=vswhere&version=2.8.4 @@ -450,7 +450,7 @@ Task ("samples") { "xamarin.forms.windows", "x86" }, }; - void BuildSample (FilePath sln) + void BuildSample (FilePath sln, bool dryrun) { var platform = sln.GetDirectory ().GetDirectoryName ().ToLower (); var name = sln.GetFilenameWithoutExtension (); @@ -470,12 +470,19 @@ Task ("samples") buildPlatform = platformMatrix [platform]; } - Information ($"Building {sln} ({platform})..."); - - RunNuGetRestorePackagesConfig (sln); - RunMSBuild (sln, platform: buildPlatform); + if (dryrun) { + Information ($" BUILD {sln}"); + } else { + Information ($"Building sample {sln} ({platform})..."); + RunNuGetRestorePackagesConfig (sln); + RunMSBuild (sln, platform: buildPlatform); + } } else { - Information ($"Skipping {sln} ({platform})..."); + if (dryrun) { + Information ($" SKIP (NS) {sln} (not supported)"); + } else { + Information ($"Skipping sample {sln} ({platform})..."); + } } } @@ -511,38 +518,49 @@ Task ("samples") Information (" " + sln); } - foreach (var sln in solutions) { - // might have been deleted due to a platform build and cleanup - if (!FileExists (sln)) - continue; - - var name = sln.GetFilenameWithoutExtension (); - var slnPlatform = name.GetExtension (); - - if (string.IsNullOrEmpty (slnPlatform)) { - // this is the main solution - var variants = GetFiles (sln.GetDirectory ().CombineWithFilePath (name) + ".*.sln"); - if (!variants.Any ()) { - // there is no platform variant - BuildSample (sln); - // delete the built sample - CleanDirectories (sln.GetDirectory ().FullPath); - } else { - // skip as there is a platform variant - } - } else { - // this is a platform variant - slnPlatform = slnPlatform.ToLower (); - var shouldBuild = - (isLinux && slnPlatform == ".linux") || - (isMac && slnPlatform == ".mac") || - (isWin && slnPlatform == ".windows"); - if (shouldBuild) { - BuildSample (sln); - // delete the built sample - CleanDirectories (sln.GetDirectory ().FullPath); + foreach (var dryrun in new [] { true, false }) { + if (dryrun) + Information ("Sample builds:"); + + foreach (var sln in solutions) { + // might have been deleted due to a platform build and cleanup + if (!FileExists (sln)) + continue; + + var name = sln.GetFilenameWithoutExtension (); + var slnPlatform = name.GetExtension (); + + if (string.IsNullOrEmpty (slnPlatform)) { + // this is the main solution + var variants = GetFiles (sln.GetDirectory ().CombineWithFilePath (name) + ".*.sln"); + if (!variants.Any ()) { + // there is no platform variant + BuildSample (sln, dryrun); + // delete the built sample + if (!dryrun) + CleanDirectories (sln.GetDirectory ().FullPath); + } else { + // skip as there is a platform variant + if (dryrun) + Information ($" SKIP (PS) {sln} (has platform specific)"); + } } else { - // skip this as this is not the correct platform + // this is a platform variant + slnPlatform = slnPlatform.ToLower (); + var shouldBuild = + (isLinux && slnPlatform == ".linux") || + (isMac && slnPlatform == ".mac") || + (isWin && slnPlatform == ".windows"); + if (shouldBuild) { + BuildSample (sln, dryrun); + // delete the built sample + if (!dryrun) + CleanDirectories (sln.GetDirectory ().FullPath); + } else { + // skip this as this is not the correct platform + if (dryrun) + Information ($" SKIP (AP) {sln} (has alternate platform)"); + } } } } diff --git a/cake/UpdateDocs.cake b/cake/UpdateDocs.cake index f9370e4a25d..8d974af6842 100644 --- a/cake/UpdateDocs.cake +++ b/cake/UpdateDocs.cake @@ -30,9 +30,12 @@ void CopyChangelogs (DirectoryPath diffRoot, string id, string version) dllName += ".breaking"; } - var changelogPath = (FilePath)$"./logs/changelogs/{id}/{version}/{dllName}.md"; + var changelogPath = (FilePath)$"./changelogs/{id}/{version}/{dllName}.md"; EnsureDirectoryExists (changelogPath.GetDirectory ()); CopyFile (file, changelogPath); + var changelogOutputPath = (FilePath)$"./output/logs/changelogs/{id}/{version}/{dllName}.md"; + EnsureDirectoryExists (changelogOutputPath.GetDirectory ()); + CopyFile (file, changelogOutputPath); } } } diff --git a/cake/UtilsManaged.cake b/cake/UtilsManaged.cake index 474ad5f01d2..079703cbdb2 100644 --- a/cake/UtilsManaged.cake +++ b/cake/UtilsManaged.cake @@ -181,7 +181,10 @@ string[] GetReferenceSearchPaths() var refs = new List(); if (IsRunningOnWindows()) { - var vs = VS_INSTALL ?? VSWhereLatest(new VSWhereLatestSettings { Requires = "Component.Xamarin" }); + var vs = + VS_INSTALL ?? + VSWhereLatest(new VSWhereLatestSettings { Requires = "Component.Xamarin" }) ?? + VSWhereLatest(new VSWhereLatestSettings { Requires = "Component.Xamarin", IncludePrerelease = true }); var referenceAssemblies = $"{vs}/Common7/IDE/ReferenceAssemblies/Microsoft/Framework"; var pf = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86); @@ -196,7 +199,6 @@ string[] GetReferenceSearchPaths() refs.Add($"{pf}/Windows Kits/10/UnionMetadata/Facade"); refs.Add($"{pf}/Windows Kits/10/References/Windows.Foundation.UniversalApiContract/1.0.0.0"); refs.Add($"{pf}/Windows Kits/10/References/Windows.Foundation.FoundationContract/1.0.0.0"); - refs.Add($"{pf}/GtkSharp/2.12/lib"); refs.Add($"{pf}/GtkSharp/2.12/lib/gtk-sharp-2.0"); refs.Add($"{vs}/Common7/IDE/PublicAssemblies"); } else { @@ -237,7 +239,7 @@ async Task CreateNuGetDiffAsync() comparer.SearchPaths.AddRange(GetReferenceSearchPaths()); comparer.PackageCache = PACKAGE_CACHE_PATH.FullPath; - await AddDep("OpenTK.GLControl", "NET40"); + await AddDep("OpenTK.GLControl", "NET20"); await AddDep("Tizen.NET", "netstandard2.0"); await AddDep("Xamarin.Forms", "netstandard2.0"); await AddDep("Xamarin.Forms", "MonoAndroid90"); @@ -253,7 +255,7 @@ async Task CreateNuGetDiffAsync() await AddDep("AtkSharp", "netstandard2.0"); await AddDep("System.Memory", "netstandard2.0"); await AddDep("Uno.UI", "netstandard2.0"); - await AddDep("Uno.UI", "MonoAndroid90"); + await AddDep("Uno.UI", "MonoAndroid10.0"); await AddDep("Uno.UI", "xamarinios10"); await AddDep("Uno.UI", "xamarinmac20"); await AddDep("Uno.UI", "UAP"); @@ -266,6 +268,12 @@ async Task CreateNuGetDiffAsync() await AddDep("Xamarin.Forms", "Xamarin.Mac", "reference"); await AddDep("Xamarin.Forms", "uap10.0", "reference"); + Verbose("Added search paths:"); + foreach (var path in comparer.SearchPaths) { + var found = GetFiles($"{path}/*.dll").Any() || GetFiles($"{path}/*.winmd").Any(); + Verbose($" {(found ? " " : "!")} {path}"); + } + return comparer; async Task AddDep(string id, string platform, string type = "release") diff --git a/changelogs/HarfBuzzSharp/2.8.2/HarfBuzzSharp.md b/changelogs/HarfBuzzSharp/2.8.2/HarfBuzzSharp.md new file mode 100644 index 00000000000..c043585d336 --- /dev/null +++ b/changelogs/HarfBuzzSharp/2.8.2/HarfBuzzSharp.md @@ -0,0 +1,5 @@ +# API diff: HarfBuzzSharp.dll + +## HarfBuzzSharp.dll + +> No changes. diff --git a/changelogs/SkiaSharp.Views.Blazor/2.88.0/SkiaSharp.Views.Blazor.md b/changelogs/SkiaSharp.Views.Blazor/2.88.0/SkiaSharp.Views.Blazor.md new file mode 100644 index 00000000000..de5a20cf2c5 --- /dev/null +++ b/changelogs/SkiaSharp.Views.Blazor/2.88.0/SkiaSharp.Views.Blazor.md @@ -0,0 +1,103 @@ +# API diff: SkiaSharp.Views.Blazor.dll + +## SkiaSharp.Views.Blazor.dll + +> Assembly Version Changed: 2.88.0.0 vs 0.0.0.0 + +### New Namespace SkiaSharp.Views.Blazor + +#### New Type: SkiaSharp.Views.Blazor.SKCanvasView + +```csharp +public class SKCanvasView : Microsoft.AspNetCore.Components.ComponentBase, Microsoft.AspNetCore.Components.IComponent, Microsoft.AspNetCore.Components.IHandleAfterRender, Microsoft.AspNetCore.Components.IHandleEvent, System.IDisposable { + // constructors + public SKCanvasView (); + // properties + public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { get; set; } + public bool EnableRenderLoop { get; set; } + public bool IgnorePixelScaling { get; set; } + public System.Action OnPaintSurface { get; set; } + // methods + protected override void BuildRenderTree (Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder); + public virtual void Dispose (); + public void Invalidate (); + protected override System.Threading.Tasks.Task OnAfterRenderAsync (bool firstRender); +} +``` + +#### New Type: SkiaSharp.Views.Blazor.SKGLView + +```csharp +public class SKGLView : Microsoft.AspNetCore.Components.ComponentBase, Microsoft.AspNetCore.Components.IComponent, Microsoft.AspNetCore.Components.IHandleAfterRender, Microsoft.AspNetCore.Components.IHandleEvent, System.IDisposable { + // constructors + public SKGLView (); + // properties + public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { get; set; } + public bool EnableRenderLoop { get; set; } + public bool IgnorePixelScaling { get; set; } + public System.Action OnPaintSurface { get; set; } + // methods + protected override void BuildRenderTree (Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder); + public virtual void Dispose (); + public void Invalidate (); + protected override System.Threading.Tasks.Task OnAfterRenderAsync (bool firstRender); +} +``` + +#### New Type: SkiaSharp.Views.Blazor.SKPaintGLSurfaceEventArgs + +```csharp +public class SKPaintGLSurfaceEventArgs : System.EventArgs { + // constructors + public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget 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.SKImageInfo info); + public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); + // properties + public SkiaSharp.GRBackendRenderTarget BackendRenderTarget { get; } + public SkiaSharp.SKColorType ColorType { get; } + public SkiaSharp.SKImageInfo Info { get; } + public SkiaSharp.GRSurfaceOrigin Origin { get; } + public SkiaSharp.SKImageInfo RawInfo { get; } + public SkiaSharp.SKSurface Surface { get; } +} +``` + +#### New Type: SkiaSharp.Views.Blazor.SKPaintSurfaceEventArgs + +```csharp +public class SKPaintSurfaceEventArgs : System.EventArgs { + // constructors + public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info); + public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); + // properties + public SkiaSharp.SKImageInfo Info { get; } + public SkiaSharp.SKImageInfo RawInfo { get; } + public SkiaSharp.SKSurface Surface { get; } +} +``` + +### New Namespace SkiaSharp.Views.Blazor.Internal + +#### New Type: SkiaSharp.Views.Blazor.Internal.ActionHelper + +```csharp +public class ActionHelper { + // constructors + public ActionHelper (System.Action action); + // methods + public void Invoke (); +} +``` + +#### New Type: SkiaSharp.Views.Blazor.Internal.FloatFloatActionHelper + +```csharp +public class FloatFloatActionHelper { + // constructors + public FloatFloatActionHelper (System.Action action); + // methods + public void Invoke (float width, float height); +} +``` + diff --git a/changelogs/SkiaSharp.Views.Desktop.Common/2.88.0/SkiaSharp.Views.Desktop.Common.md b/changelogs/SkiaSharp.Views.Desktop.Common/2.88.0/SkiaSharp.Views.Desktop.Common.md index 1aecff62fb4..041af633f50 100644 --- a/changelogs/SkiaSharp.Views.Desktop.Common/2.88.0/SkiaSharp.Views.Desktop.Common.md +++ b/changelogs/SkiaSharp.Views.Desktop.Common/2.88.0/SkiaSharp.Views.Desktop.Common.md @@ -6,18 +6,42 @@ ### Namespace SkiaSharp.Views.Desktop -#### Type Changed: SkiaSharp.Views.Desktop.Extensions +#### Type Changed: SkiaSharp.Views.Desktop.SKPaintGLSurfaceEventArgs -Added methods: +Obsoleted constructors: + +```diff + [Obsolete ()] + public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.GRGlFramebufferInfo glInfo); +``` + +Added constructors: + +```csharp +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info); +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); +``` + +Added properties: + +```csharp +public SkiaSharp.SKImageInfo Info { get; } +public SkiaSharp.SKImageInfo RawInfo { get; } +``` + + +#### Type Changed: SkiaSharp.Views.Desktop.SKPaintSurfaceEventArgs + +Added constructor: + +```csharp +public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); +``` + +Added property: ```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); +public SkiaSharp.SKImageInfo RawInfo { get; } ``` diff --git a/changelogs/SkiaSharp.Views.Forms.GTK/2.88.0/SkiaSharp.Views.Forms.md b/changelogs/SkiaSharp.Views.Forms.GTK/2.88.0/SkiaSharp.Views.Forms.md index cb5b3564151..38733585876 100644 --- a/changelogs/SkiaSharp.Views.Forms.GTK/2.88.0/SkiaSharp.Views.Forms.md +++ b/changelogs/SkiaSharp.Views.Forms.GTK/2.88.0/SkiaSharp.Views.Forms.md @@ -4,3 +4,21 @@ > Assembly Version Changed: 2.88.0.0 vs 2.80.0.0 +### Namespace SkiaSharp.Views.Forms + +#### Type Changed: SkiaSharp.Views.Forms.SKPaintSurfaceEventArgs + +Added constructor: + +```csharp +public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); +``` + +Added property: + +```csharp +public SkiaSharp.SKImageInfo RawInfo { get; } +``` + + + diff --git a/changelogs/SkiaSharp.Views.Forms.WPF/2.88.0/SkiaSharp.Views.Forms.md b/changelogs/SkiaSharp.Views.Forms.WPF/2.88.0/SkiaSharp.Views.Forms.md index cb5b3564151..38733585876 100644 --- a/changelogs/SkiaSharp.Views.Forms.WPF/2.88.0/SkiaSharp.Views.Forms.md +++ b/changelogs/SkiaSharp.Views.Forms.WPF/2.88.0/SkiaSharp.Views.Forms.md @@ -4,3 +4,21 @@ > Assembly Version Changed: 2.88.0.0 vs 2.80.0.0 +### Namespace SkiaSharp.Views.Forms + +#### Type Changed: SkiaSharp.Views.Forms.SKPaintSurfaceEventArgs + +Added constructor: + +```csharp +public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); +``` + +Added property: + +```csharp +public SkiaSharp.SKImageInfo RawInfo { get; } +``` + + + diff --git a/changelogs/SkiaSharp.Views.Forms/2.88.0/SkiaSharp.Views.Forms.breaking.md b/changelogs/SkiaSharp.Views.Forms/2.88.0/SkiaSharp.Views.Forms.breaking.md new file mode 100644 index 00000000000..48c90fd3401 --- /dev/null +++ b/changelogs/SkiaSharp.Views.Forms/2.88.0/SkiaSharp.Views.Forms.breaking.md @@ -0,0 +1,51 @@ +# API diff: SkiaSharp.Views.Forms.dll + +## SkiaSharp.Views.Forms.dll + +> Assembly Version Changed: 2.88.0.0 vs 2.80.0.0 + +### Namespace SkiaSharp.Views.Forms + +#### Type Changed: SkiaSharp.Views.Forms.Resource + +#### Type Changed: SkiaSharp.Views.Forms.Resource.Id + +Removed fields: + +```csharp +public static int save_image_matrix; +public static int save_scale_type; +``` + + +#### Type Changed: SkiaSharp.Views.Forms.Resource.String + +Removed fields: + +```csharp +public static int abc_font_family_body_1_material; +public static int abc_font_family_body_2_material; +public static int abc_font_family_button_material; +public static int abc_font_family_caption_material; +public static int abc_font_family_display_1_material; +public static int abc_font_family_display_2_material; +public static int abc_font_family_display_3_material; +public static int abc_font_family_display_4_material; +public static int abc_font_family_headline_material; +public static int abc_font_family_menu_material; +public static int abc_font_family_subhead_material; +public static int abc_font_family_title_material; +``` + + +#### Type Changed: SkiaSharp.Views.Forms.Resource.Style + +Removed field: + +```csharp +public static int collectionViewStyle; +``` + + + + diff --git a/changelogs/SkiaSharp.Views.Forms/2.88.0/SkiaSharp.Views.Forms.md b/changelogs/SkiaSharp.Views.Forms/2.88.0/SkiaSharp.Views.Forms.md index cb5b3564151..38733585876 100644 --- a/changelogs/SkiaSharp.Views.Forms/2.88.0/SkiaSharp.Views.Forms.md +++ b/changelogs/SkiaSharp.Views.Forms/2.88.0/SkiaSharp.Views.Forms.md @@ -4,3 +4,21 @@ > Assembly Version Changed: 2.88.0.0 vs 2.80.0.0 +### Namespace SkiaSharp.Views.Forms + +#### Type Changed: SkiaSharp.Views.Forms.SKPaintSurfaceEventArgs + +Added constructor: + +```csharp +public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); +``` + +Added property: + +```csharp +public SkiaSharp.SKImageInfo RawInfo { get; } +``` + + + diff --git a/changelogs/SkiaSharp.Views.Maui.Controls.Compatibility/2.88.0/SkiaSharp.Views.Maui.Controls.Compatibility.md b/changelogs/SkiaSharp.Views.Maui.Controls.Compatibility/2.88.0/SkiaSharp.Views.Maui.Controls.Compatibility.md index 9d72da75d5e..7ced8299ec3 100644 --- a/changelogs/SkiaSharp.Views.Maui.Controls.Compatibility/2.88.0/SkiaSharp.Views.Maui.Controls.Compatibility.md +++ b/changelogs/SkiaSharp.Views.Maui.Controls.Compatibility/2.88.0/SkiaSharp.Views.Maui.Controls.Compatibility.md @@ -11,43 +11,20 @@ ```csharp public static class AppHostBuilderExtensions { // methods - public static Microsoft.Maui.Hosting.IAppHostBuilder UseSkiaSharpCompatibilityRenderers (this Microsoft.Maui.Hosting.IAppHostBuilder builder); -} -``` - -#### New Type: SkiaSharp.Views.Maui.Controls.Compatibility.SKCanvasViewRenderer -```csharp -public class SKCanvasViewRenderer : SkiaSharp.Views.Maui.Controls.Compatibility.SKCanvasViewRendererBase`2[SkiaSharp.Views.Maui.Controls.SKCanvasView,SkiaSharp.Views.Windows.SKXamlCanvas] { - // constructors - public SKCanvasViewRenderer (); - // methods - protected override SkiaSharp.Views.Windows.SKXamlCanvas CreateNativeControl (); + [Obsolete] +public static Microsoft.Maui.Hosting.MauiAppBuilder UseSkiaSharpCompatibilityRenderers (this Microsoft.Maui.Hosting.MauiAppBuilder builder); } ``` -#### New Type: SkiaSharp.Views.Maui.Controls.Compatibility.SKCanvasViewRendererBase`2 +### New Namespace SkiaSharp.Views.Maui.Controls.Hosting -```csharp -public abstract class SKCanvasViewRendererBase`2 : Microsoft.Maui.Controls.Compatibility.Platform.UWP.ViewRenderer`2[TFormsView,TNativeView] { - // constructors - protected SKCanvasViewRendererBase`2 (); - // methods - protected virtual TNativeView CreateNativeControl (); - protected override void Dispose (bool disposing); - protected override void OnElementChanged (Microsoft.Maui.Controls.Platform.ElementChangedEventArgs e); - protected override void OnElementPropertyChanged (object sender, System.ComponentModel.PropertyChangedEventArgs e); -} -``` - -#### New Type: SkiaSharp.Views.Maui.Controls.Compatibility.SKImageSourceHandler +#### New Type: SkiaSharp.Views.Maui.Controls.Hosting.AppHostBuilderExtensions ```csharp -public sealed class SKImageSourceHandler : Microsoft.Maui.Controls.IRegisterable { - // constructors - public SKImageSourceHandler (); +public static class AppHostBuilderExtensions { // methods - public virtual System.Threading.Tasks.Task LoadImageAsync (Microsoft.Maui.Controls.ImageSource imagesource, System.Threading.CancellationToken cancelationToken); + public static Microsoft.Maui.Hosting.MauiAppBuilder UseSkiaSharp (this Microsoft.Maui.Hosting.MauiAppBuilder builder, bool registerRenderers, bool replaceHandlers); } ``` diff --git a/changelogs/SkiaSharp.Views.Maui.Controls/2.88.0/SkiaSharp.Views.Maui.Controls.md b/changelogs/SkiaSharp.Views.Maui.Controls/2.88.0/SkiaSharp.Views.Maui.Controls.md index 27e61fa5802..2f4374794c9 100644 --- a/changelogs/SkiaSharp.Views.Maui.Controls/2.88.0/SkiaSharp.Views.Maui.Controls.md +++ b/changelogs/SkiaSharp.Views.Maui.Controls/2.88.0/SkiaSharp.Views.Maui.Controls.md @@ -11,7 +11,9 @@ ```csharp public static class AppHostBuilderExtensions { // methods - public static Microsoft.Maui.Hosting.IAppHostBuilder UseSkiaSharpHandlers (this Microsoft.Maui.Hosting.IAppHostBuilder builder); + + [Obsolete] +public static Microsoft.Maui.Hosting.MauiAppBuilder UseSkiaSharpHandlers (this Microsoft.Maui.Hosting.MauiAppBuilder builder); } ``` @@ -56,7 +58,7 @@ public interface ISKGLViewController : Microsoft.Maui.Controls.IElementControlle #### New Type: SkiaSharp.Views.Maui.Controls.SKBitmapImageSource ```csharp -public sealed class SKBitmapImageSource : Microsoft.Maui.Controls.ImageSource, Microsoft.Maui.Controls.IElementController, Microsoft.Maui.Controls.Internals.IDynamicResourceHandler, Microsoft.Maui.Controls.Internals.INameScope, Microsoft.Maui.IElement, Microsoft.Maui.IImageSource, SkiaSharp.Views.Maui.ISKBitmapImageSource, System.ComponentModel.INotifyPropertyChanged { +public sealed class SKBitmapImageSource : Microsoft.Maui.Controls.ImageSource, Microsoft.Maui.Controls.IEffectControlProvider, Microsoft.Maui.Controls.IElementController, Microsoft.Maui.Controls.Internals.IDynamicResourceHandler, Microsoft.Maui.Controls.Internals.INameScope, Microsoft.Maui.IElement, Microsoft.Maui.IImageSource, Microsoft.Maui.IVisualTreeElement, SkiaSharp.Views.Maui.ISKBitmapImageSource, System.ComponentModel.INotifyPropertyChanged { // constructors public SKBitmapImageSource (); // fields @@ -74,7 +76,7 @@ public sealed class SKBitmapImageSource : Microsoft.Maui.Controls.ImageSource, M #### New Type: SkiaSharp.Views.Maui.Controls.SKCanvasView ```csharp -public class SKCanvasView : Microsoft.Maui.Controls.View, Microsoft.Maui.Controls.IAnimatable, Microsoft.Maui.Controls.IElementController, Microsoft.Maui.Controls.IGestureRecognizers, Microsoft.Maui.Controls.ITabStopElement, Microsoft.Maui.Controls.IViewController, Microsoft.Maui.Controls.IVisualElementController, Microsoft.Maui.Controls.Internals.IDynamicResourceHandler, Microsoft.Maui.Controls.Internals.IGestureController, Microsoft.Maui.Controls.Internals.INameScope, Microsoft.Maui.Controls.Internals.INavigationProxy, Microsoft.Maui.HotReload.IHotReloadableView, Microsoft.Maui.IElement, Microsoft.Maui.IFrameworkElement, Microsoft.Maui.IPropertyMapperView, Microsoft.Maui.IReplaceableView, Microsoft.Maui.ITransform, Microsoft.Maui.IView, ISKCanvasViewController, SkiaSharp.Views.Maui.ISKCanvasView, System.ComponentModel.INotifyPropertyChanged { +public class SKCanvasView : Microsoft.Maui.Controls.View, Microsoft.Maui.Controls.IAnimatable, Microsoft.Maui.Controls.IEffectControlProvider, Microsoft.Maui.Controls.IElementController, Microsoft.Maui.Controls.IGestureRecognizers, Microsoft.Maui.Controls.IViewController, Microsoft.Maui.Controls.IVisualElementController, Microsoft.Maui.Controls.Internals.IDynamicResourceHandler, Microsoft.Maui.Controls.Internals.IGestureController, Microsoft.Maui.Controls.Internals.INameScope, Microsoft.Maui.Controls.Internals.INavigationProxy, Microsoft.Maui.HotReload.IHotReloadableView, Microsoft.Maui.IElement, Microsoft.Maui.IPropertyMapperView, Microsoft.Maui.IReplaceableView, Microsoft.Maui.ITransform, Microsoft.Maui.IView, Microsoft.Maui.IVisualTreeElement, ISKCanvasViewController, SkiaSharp.Views.Maui.ISKCanvasView, System.ComponentModel.INotifyPropertyChanged { // constructors public SKCanvasView (); // fields @@ -98,7 +100,7 @@ public class SKCanvasView : Microsoft.Maui.Controls.View, Microsoft.Maui.Control #### New Type: SkiaSharp.Views.Maui.Controls.SKGLView ```csharp -public class SKGLView : Microsoft.Maui.Controls.View, Microsoft.Maui.Controls.IAnimatable, Microsoft.Maui.Controls.IElementController, Microsoft.Maui.Controls.IGestureRecognizers, Microsoft.Maui.Controls.ITabStopElement, Microsoft.Maui.Controls.IViewController, Microsoft.Maui.Controls.IVisualElementController, Microsoft.Maui.Controls.Internals.IDynamicResourceHandler, Microsoft.Maui.Controls.Internals.IGestureController, Microsoft.Maui.Controls.Internals.INameScope, Microsoft.Maui.Controls.Internals.INavigationProxy, Microsoft.Maui.HotReload.IHotReloadableView, Microsoft.Maui.IElement, Microsoft.Maui.IFrameworkElement, Microsoft.Maui.IPropertyMapperView, Microsoft.Maui.IReplaceableView, Microsoft.Maui.ITransform, Microsoft.Maui.IView, ISKGLViewController, System.ComponentModel.INotifyPropertyChanged { +public class SKGLView : Microsoft.Maui.Controls.View, Microsoft.Maui.Controls.IAnimatable, Microsoft.Maui.Controls.IEffectControlProvider, Microsoft.Maui.Controls.IElementController, Microsoft.Maui.Controls.IGestureRecognizers, Microsoft.Maui.Controls.IViewController, Microsoft.Maui.Controls.IVisualElementController, Microsoft.Maui.Controls.Internals.IDynamicResourceHandler, Microsoft.Maui.Controls.Internals.IGestureController, Microsoft.Maui.Controls.Internals.INameScope, Microsoft.Maui.Controls.Internals.INavigationProxy, Microsoft.Maui.HotReload.IHotReloadableView, Microsoft.Maui.IElement, Microsoft.Maui.IPropertyMapperView, Microsoft.Maui.IReplaceableView, Microsoft.Maui.ITransform, Microsoft.Maui.IView, Microsoft.Maui.IVisualTreeElement, ISKGLViewController, System.ComponentModel.INotifyPropertyChanged { // constructors public SKGLView (); // fields @@ -123,7 +125,7 @@ public class SKGLView : Microsoft.Maui.Controls.View, Microsoft.Maui.Controls.IA #### New Type: SkiaSharp.Views.Maui.Controls.SKImageImageSource ```csharp -public sealed class SKImageImageSource : Microsoft.Maui.Controls.ImageSource, Microsoft.Maui.Controls.IElementController, Microsoft.Maui.Controls.Internals.IDynamicResourceHandler, Microsoft.Maui.Controls.Internals.INameScope, Microsoft.Maui.IElement, Microsoft.Maui.IImageSource, SkiaSharp.Views.Maui.ISKImageImageSource, System.ComponentModel.INotifyPropertyChanged { +public sealed class SKImageImageSource : Microsoft.Maui.Controls.ImageSource, Microsoft.Maui.Controls.IEffectControlProvider, Microsoft.Maui.Controls.IElementController, Microsoft.Maui.Controls.Internals.IDynamicResourceHandler, Microsoft.Maui.Controls.Internals.INameScope, Microsoft.Maui.IElement, Microsoft.Maui.IImageSource, Microsoft.Maui.IVisualTreeElement, SkiaSharp.Views.Maui.ISKImageImageSource, System.ComponentModel.INotifyPropertyChanged { // constructors public SKImageImageSource (); // fields @@ -141,7 +143,7 @@ public sealed class SKImageImageSource : Microsoft.Maui.Controls.ImageSource, Mi #### New Type: SkiaSharp.Views.Maui.Controls.SKPictureImageSource ```csharp -public sealed class SKPictureImageSource : Microsoft.Maui.Controls.ImageSource, Microsoft.Maui.Controls.IElementController, Microsoft.Maui.Controls.Internals.IDynamicResourceHandler, Microsoft.Maui.Controls.Internals.INameScope, Microsoft.Maui.IElement, Microsoft.Maui.IImageSource, SkiaSharp.Views.Maui.ISKPictureImageSource, System.ComponentModel.INotifyPropertyChanged { +public sealed class SKPictureImageSource : Microsoft.Maui.Controls.ImageSource, Microsoft.Maui.Controls.IEffectControlProvider, Microsoft.Maui.Controls.IElementController, Microsoft.Maui.Controls.Internals.IDynamicResourceHandler, Microsoft.Maui.Controls.Internals.INameScope, Microsoft.Maui.IElement, Microsoft.Maui.IImageSource, Microsoft.Maui.IVisualTreeElement, SkiaSharp.Views.Maui.ISKPictureImageSource, System.ComponentModel.INotifyPropertyChanged { // constructors public SKPictureImageSource (); // fields @@ -160,7 +162,7 @@ public sealed class SKPictureImageSource : Microsoft.Maui.Controls.ImageSource, #### New Type: SkiaSharp.Views.Maui.Controls.SKPixmapImageSource ```csharp -public sealed class SKPixmapImageSource : Microsoft.Maui.Controls.ImageSource, Microsoft.Maui.Controls.IElementController, Microsoft.Maui.Controls.Internals.IDynamicResourceHandler, Microsoft.Maui.Controls.Internals.INameScope, Microsoft.Maui.IElement, Microsoft.Maui.IImageSource, SkiaSharp.Views.Maui.ISKPixmapImageSource, System.ComponentModel.INotifyPropertyChanged { +public sealed class SKPixmapImageSource : Microsoft.Maui.Controls.ImageSource, Microsoft.Maui.Controls.IEffectControlProvider, Microsoft.Maui.Controls.IElementController, Microsoft.Maui.Controls.Internals.IDynamicResourceHandler, Microsoft.Maui.Controls.Internals.INameScope, Microsoft.Maui.IElement, Microsoft.Maui.IImageSource, Microsoft.Maui.IVisualTreeElement, SkiaSharp.Views.Maui.ISKPixmapImageSource, System.ComponentModel.INotifyPropertyChanged { // constructors public SKPixmapImageSource (); // fields @@ -175,3 +177,14 @@ public sealed class SKPixmapImageSource : Microsoft.Maui.Controls.ImageSource, M } ``` +### New Namespace SkiaSharp.Views.Maui.Controls.Hosting + +#### New Type: SkiaSharp.Views.Maui.Controls.Hosting.AppHostBuilderExtensions + +```csharp +public static class AppHostBuilderExtensions { + // methods + public static Microsoft.Maui.Hosting.MauiAppBuilder UseSkiaSharp (this Microsoft.Maui.Hosting.MauiAppBuilder builder); +} +``` + diff --git a/changelogs/SkiaSharp.Views.Maui.Core/2.88.0/SkiaSharp.Views.Maui.Core.md b/changelogs/SkiaSharp.Views.Maui.Core/2.88.0/SkiaSharp.Views.Maui.Core.md index 44ce3d88d53..078f5fb8aa2 100644 --- a/changelogs/SkiaSharp.Views.Maui.Core/2.88.0/SkiaSharp.Views.Maui.Core.md +++ b/changelogs/SkiaSharp.Views.Maui.Core/2.88.0/SkiaSharp.Views.Maui.Core.md @@ -17,10 +17,10 @@ public static class Extensions { public static Microsoft.Maui.Graphics.Point ToMauiPoint (this SkiaSharp.SKPointI point); public static Microsoft.Maui.Graphics.PointF ToMauiPointF (this SkiaSharp.SKPoint point); public static Microsoft.Maui.Graphics.PointF ToMauiPointF (this SkiaSharp.SKPointI point); - public static Microsoft.Maui.Graphics.Rectangle ToMauiRectangle (this SkiaSharp.SKRect rect); - public static Microsoft.Maui.Graphics.Rectangle ToMauiRectangle (this SkiaSharp.SKRectI rect); - public static Microsoft.Maui.Graphics.RectangleF ToMauiRectangleF (this SkiaSharp.SKRect rect); - public static Microsoft.Maui.Graphics.RectangleF ToMauiRectangleF (this SkiaSharp.SKRectI rect); + public static Microsoft.Maui.Graphics.Rect ToMauiRectangle (this SkiaSharp.SKRect rect); + public static Microsoft.Maui.Graphics.Rect ToMauiRectangle (this SkiaSharp.SKRectI rect); + public static Microsoft.Maui.Graphics.RectF ToMauiRectangleF (this SkiaSharp.SKRect rect); + public static Microsoft.Maui.Graphics.RectF ToMauiRectangleF (this SkiaSharp.SKRectI rect); public static Microsoft.Maui.Graphics.Size ToMauiSize (this SkiaSharp.SKSize size); public static Microsoft.Maui.Graphics.Size ToMauiSize (this SkiaSharp.SKSizeI size); public static Microsoft.Maui.Graphics.SizeF ToMauiSizeF (this SkiaSharp.SKSize size); @@ -29,8 +29,8 @@ public static class Extensions { public static SkiaSharp.SKColorF ToSKColorF (this Microsoft.Maui.Graphics.Color color); public static SkiaSharp.SKPoint ToSKPoint (this Microsoft.Maui.Graphics.Point point); public static SkiaSharp.SKPoint ToSKPoint (this Microsoft.Maui.Graphics.PointF point); - public static SkiaSharp.SKRect ToSKRect (this Microsoft.Maui.Graphics.Rectangle rect); - public static SkiaSharp.SKRect ToSKRect (this Microsoft.Maui.Graphics.RectangleF rect); + public static SkiaSharp.SKRect ToSKRect (this Microsoft.Maui.Graphics.Rect rect); + public static SkiaSharp.SKRect ToSKRect (this Microsoft.Maui.Graphics.RectF rect); public static SkiaSharp.SKSize ToSKSize (this Microsoft.Maui.Graphics.Size size); public static SkiaSharp.SKSize ToSKSize (this Microsoft.Maui.Graphics.SizeF size); } @@ -48,7 +48,7 @@ public interface ISKBitmapImageSource : Microsoft.Maui.IImageSource { #### New Type: SkiaSharp.Views.Maui.ISKCanvasView ```csharp -public interface ISKCanvasView : Microsoft.Maui.IElement, Microsoft.Maui.IFrameworkElement, Microsoft.Maui.ITransform, Microsoft.Maui.IView { +public interface ISKCanvasView : Microsoft.Maui.IElement, Microsoft.Maui.ITransform, Microsoft.Maui.IView { // properties public virtual SkiaSharp.SKSize CanvasSize { get; } public virtual bool EnableTouchEvents { get; } @@ -122,8 +122,10 @@ public class SKPaintGLSurfaceEventArgs : System.EventArgs { public class SKPaintSurfaceEventArgs : System.EventArgs { // constructors public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info); + public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); // properties public SkiaSharp.SKImageInfo Info { get; } + public SkiaSharp.SKImageInfo RawInfo { get; } public SkiaSharp.SKSurface Surface { get; } } ``` @@ -183,19 +185,18 @@ public class SKTouchEventArgs : System.EventArgs { #### New Type: SkiaSharp.Views.Maui.Handlers.SKCanvasViewHandler ```csharp -public class SKCanvasViewHandler : Microsoft.Maui.Handlers.ViewHandler`2[SkiaSharp.Views.Maui.ISKCanvasView,SkiaSharp.Views.Windows.SKXamlCanvas], Microsoft.Maui.IElementHandler, Microsoft.Maui.INativeViewHandler, Microsoft.Maui.IViewHandler { +public class SKCanvasViewHandler : Microsoft.Maui.Handlers.ViewHandler`2[SkiaSharp.Views.Maui.ISKCanvasView,System.Object], Microsoft.Maui.IElementHandler, Microsoft.Maui.IPlatformViewHandler, Microsoft.Maui.IViewHandler { // constructors public SKCanvasViewHandler (); - public SKCanvasViewHandler (Microsoft.Maui.PropertyMapper mapper); + public SKCanvasViewHandler (Microsoft.Maui.PropertyMapper mapper, Microsoft.Maui.CommandMapper commands); // fields + public static Microsoft.Maui.CommandMapper SKCanvasViewCommandMapper; public static Microsoft.Maui.PropertyMapper SKCanvasViewMapper; // methods - protected override void ConnectHandler (SkiaSharp.Views.Windows.SKXamlCanvas nativeView); - protected override SkiaSharp.Views.Windows.SKXamlCanvas CreateNativeView (); - protected override void DisconnectHandler (SkiaSharp.Views.Windows.SKXamlCanvas nativeView); + protected override object CreatePlatformView (); public static void MapEnableTouchEvents (SKCanvasViewHandler handler, SkiaSharp.Views.Maui.ISKCanvasView canvasView); public static void MapIgnorePixelScaling (SKCanvasViewHandler handler, SkiaSharp.Views.Maui.ISKCanvasView canvasView); - public static void OnInvalidateSurface (SKCanvasViewHandler handler, SkiaSharp.Views.Maui.ISKCanvasView canvasView); + public static void OnInvalidateSurface (SKCanvasViewHandler handler, SkiaSharp.Views.Maui.ISKCanvasView canvasView, object args); } ``` @@ -206,19 +207,6 @@ public class SKImageSourceService : Microsoft.Maui.ImageSourceService, Microsoft // constructors public SKImageSourceService (); public SKImageSourceService (Microsoft.Extensions.Logging.ILogger logger); - // methods - public override System.Threading.Tasks.Task> GetImageSourceAsync (Microsoft.Maui.IImageSource imageSource, float scale, System.Threading.CancellationToken cancellationToken); -} -``` - -### New Namespace SkiaSharp.Views.Maui.Platform - -#### New Type: SkiaSharp.Views.Maui.Platform.SKCanvasViewExtensions - -```csharp -public static class SKCanvasViewExtensions { - // methods - public static void UpdateIgnorePixelScaling (this SkiaSharp.Views.Windows.SKXamlCanvas nativeView, SkiaSharp.Views.Maui.ISKCanvasView canvasView); } ``` diff --git a/changelogs/SkiaSharp.Views.Uno/2.88.0/SkiaSharp.Views.UWP.breaking.md b/changelogs/SkiaSharp.Views.Uno/2.88.0/SkiaSharp.Views.UWP.breaking.md deleted file mode 100644 index 4d53bf40b74..00000000000 --- a/changelogs/SkiaSharp.Views.Uno/2.88.0/SkiaSharp.Views.UWP.breaking.md +++ /dev/null @@ -1,19 +0,0 @@ -# API diff: SkiaSharp.Views.UWP.dll - -## SkiaSharp.Views.UWP.dll - -> Assembly Version Changed: 2.88.0.0 vs 2.80.0.0 - -### Namespace SkiaSharp.Views.UWP - -#### Type Changed: SkiaSharp.Views.UWP.SKXamlCanvas - -Modified base type: - -```diff --Windows.UI.Xaml.FrameworkElement -+Windows.UI.Xaml.Controls.Canvas -``` - - - diff --git a/changelogs/SkiaSharp.Views.Uno/2.88.0/SkiaSharp.Views.UWP.md b/changelogs/SkiaSharp.Views.Uno/2.88.0/SkiaSharp.Views.UWP.md index 5d3ab5036e2..dc5f2df58ed 100644 --- a/changelogs/SkiaSharp.Views.Uno/2.88.0/SkiaSharp.Views.UWP.md +++ b/changelogs/SkiaSharp.Views.Uno/2.88.0/SkiaSharp.Views.UWP.md @@ -6,39 +6,42 @@ ### Namespace SkiaSharp.Views.UWP -#### Type Changed: SkiaSharp.Views.UWP.GlobalStaticResources +#### Type Changed: SkiaSharp.Views.UWP.SKPaintGLSurfaceEventArgs -Obsoleted methods: +Obsoleted constructors: ```diff [Obsolete ()] - public static object FindResource (string name); + public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.GRGlFramebufferInfo glInfo); ``` -Added methods: +Added constructors: ```csharp -public static void RegisterDefaultStyles (); -public static void RegisterResourceDictionariesBySource (); +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info); +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); ``` - -#### Type Changed: SkiaSharp.Views.UWP.SKSwapChainPanel - -Added property: +Added properties: ```csharp -public static bool RaiseOnUnsupported { get; set; } +public SkiaSharp.SKImageInfo Info { get; } +public SkiaSharp.SKImageInfo RawInfo { get; } ``` -#### Type Changed: SkiaSharp.Views.UWP.SKXamlCanvas +#### Type Changed: SkiaSharp.Views.UWP.SKPaintSurfaceEventArgs -Modified base type: +Added constructor: -```diff --Windows.UI.Xaml.FrameworkElement -+Windows.UI.Xaml.Controls.Canvas +```csharp +public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); +``` + +Added property: + +```csharp +public SkiaSharp.SKImageInfo RawInfo { get; } ``` diff --git a/changelogs/SkiaSharp.Views.WinUI/2.88.0/SkiaSharp.Views.Windows.md b/changelogs/SkiaSharp.Views.WinUI/2.88.0/SkiaSharp.Views.Windows.md index 9aff18384ae..2483b483b04 100644 --- a/changelogs/SkiaSharp.Views.WinUI/2.88.0/SkiaSharp.Views.Windows.md +++ b/changelogs/SkiaSharp.Views.WinUI/2.88.0/SkiaSharp.Views.Windows.md @@ -2,102 +2,47 @@ ## SkiaSharp.Views.Windows.dll -> Assembly Version Changed: 2.88.0.0 vs 0.0.0.0 +> Assembly Version Changed: 2.88.0.0 vs 2.80.0.0 -### New Namespace SkiaSharp.Views.Windows +### Namespace SkiaSharp.Views.Windows -#### New Type: SkiaSharp.Views.Windows.Extensions +#### Type Changed: SkiaSharp.Views.Windows.SKPaintGLSurfaceEventArgs -```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); -} +Obsoleted constructors: + +```diff + [Obsolete ()] + public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.GRGlFramebufferInfo glInfo); ``` -#### New Type: SkiaSharp.Views.Windows.SKPaintGLSurfaceEventArgs +Added constructors: ```csharp -public class SKPaintGLSurfaceEventArgs : System.EventArgs { - // constructors - public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget); - - [Obsolete] -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] -public SkiaSharp.GRBackendRenderTargetDesc RenderTarget { get; } - public SkiaSharp.SKSurface Surface { get; } -} +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info); +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); ``` -#### New Type: SkiaSharp.Views.Windows.SKPaintSurfaceEventArgs +Added properties: ```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; } -} +public SkiaSharp.SKImageInfo Info { get; } +public SkiaSharp.SKImageInfo RawInfo { get; } ``` -#### New Type: SkiaSharp.Views.Windows.SKXamlCanvas + +#### Type Changed: SkiaSharp.Views.Windows.SKPaintSurfaceEventArgs + +Added constructor: ```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, System.Runtime.InteropServices.IDynamicInterfaceCastable, 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); -} +public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); ``` -#### New Type: SkiaSharp.Views.Windows.WindowsExtensions +Added property: ```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); -} +public SkiaSharp.SKImageInfo RawInfo { get; } ``` + + diff --git a/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.Android.md b/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.Android.md index 9d68d737450..1001f662649 100644 --- a/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.Android.md +++ b/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.Android.md @@ -127,6 +127,13 @@ public class Resource { // inner types public class Attribute { + // fields + public static int ignorePixelScaling; + } + public class Styleable { + // fields + public static int[] SKCanvasView; + public static int SKCanvasView_ignorePixelScaling; } } ``` @@ -274,11 +281,17 @@ public class SKPaintGLSurfaceEventArgs : System.EventArgs { [Obsolete] 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); + public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info); + + [Obsolete] +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.GRGlFramebufferInfo glInfo); + public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); // properties public SkiaSharp.GRBackendRenderTarget BackendRenderTarget { get; } public SkiaSharp.SKColorType ColorType { get; } + public SkiaSharp.SKImageInfo Info { get; } public SkiaSharp.GRSurfaceOrigin Origin { get; } + public SkiaSharp.SKImageInfo RawInfo { get; } [Obsolete] public SkiaSharp.GRBackendRenderTargetDesc RenderTarget { get; } @@ -292,8 +305,10 @@ public SkiaSharp.GRBackendRenderTargetDesc RenderTarget { get; } public class SKPaintSurfaceEventArgs : System.EventArgs { // constructors public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info); + public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); // properties public SkiaSharp.SKImageInfo Info { get; } + public SkiaSharp.SKImageInfo RawInfo { get; } public SkiaSharp.SKSurface Surface { get; } } ``` diff --git a/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.Mac.md b/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.Mac.md index 05d9539640e..144f4b8d69b 100644 --- a/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.Mac.md +++ b/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.Mac.md @@ -6,39 +6,43 @@ ### Namespace SkiaSharp.Views.Mac -#### New Type: SkiaSharp.Views.Mac.SKMetalView +#### Type Changed: SkiaSharp.Views.Mac.SKPaintGLSurfaceEventArgs + +Obsoleted constructors: + +```diff + [Obsolete ()] + public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.GRGlFramebufferInfo glInfo); +``` + +Added constructors: ```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); -} +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info); +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); ``` -#### New Type: SkiaSharp.Views.Mac.SKPaintMetalSurfaceEventArgs +Added properties: ```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; } -} +public SkiaSharp.SKImageInfo Info { get; } +public SkiaSharp.SKImageInfo RawInfo { get; } ``` +#### Type Changed: SkiaSharp.Views.Mac.SKPaintSurfaceEventArgs + +Added constructor: + +```csharp +public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); +``` + +Added property: + +```csharp +public SkiaSharp.SKImageInfo RawInfo { get; } +``` + + + diff --git a/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.Tizen.md b/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.Tizen.md index b9598a5abd8..485ffceba5d 100644 --- a/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.Tizen.md +++ b/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.Tizen.md @@ -4,3 +4,72 @@ > Assembly Version Changed: 2.88.0.0 vs 2.80.0.0 +### Namespace SkiaSharp.Views.Tizen + +#### Type Changed: SkiaSharp.Views.Tizen.CustomRenderingView + +Added method: + +```csharp +protected virtual SkiaSharp.SKSizeI GetRawSurfaceSize (); +``` + + +#### Type Changed: SkiaSharp.Views.Tizen.SKCanvasView + +Added method: + +```csharp +protected override SkiaSharp.SKSizeI GetRawSurfaceSize (); +``` + + +#### Type Changed: SkiaSharp.Views.Tizen.SKPaintGLSurfaceEventArgs + +Obsoleted constructors: + +```diff + [Obsolete ()] + public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.GRGlFramebufferInfo glInfo); +``` + +Added constructors: + +```csharp +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info); +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); +``` + +Added properties: + +```csharp +public SkiaSharp.SKImageInfo Info { get; } +public SkiaSharp.SKImageInfo RawInfo { get; } +``` + + +#### Type Changed: SkiaSharp.Views.Tizen.SKPaintSurfaceEventArgs + +Added constructor: + +```csharp +public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); +``` + +Added property: + +```csharp +public SkiaSharp.SKImageInfo RawInfo { get; } +``` + + +#### Type Changed: SkiaSharp.Views.Tizen.ScalingInfo + +Added method: + +```csharp +public static void SetScalingFactor (double? scalingFactor); +``` + + + diff --git a/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.UWP.md b/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.UWP.md index d1c0661243c..dc5f2df58ed 100644 --- a/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.UWP.md +++ b/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.UWP.md @@ -4,3 +4,45 @@ > Assembly Version Changed: 2.88.0.0 vs 2.80.0.0 +### Namespace SkiaSharp.Views.UWP + +#### Type Changed: SkiaSharp.Views.UWP.SKPaintGLSurfaceEventArgs + +Obsoleted constructors: + +```diff + [Obsolete ()] + public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.GRGlFramebufferInfo glInfo); +``` + +Added constructors: + +```csharp +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info); +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); +``` + +Added properties: + +```csharp +public SkiaSharp.SKImageInfo Info { get; } +public SkiaSharp.SKImageInfo RawInfo { get; } +``` + + +#### Type Changed: SkiaSharp.Views.UWP.SKPaintSurfaceEventArgs + +Added constructor: + +```csharp +public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); +``` + +Added property: + +```csharp +public SkiaSharp.SKImageInfo RawInfo { get; } +``` + + + diff --git a/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.iOS.md b/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.iOS.md index 3d9ec9fb430..3af25fbead0 100644 --- a/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.iOS.md +++ b/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.iOS.md @@ -6,39 +6,52 @@ ### Namespace SkiaSharp.Views.iOS -#### New Type: SkiaSharp.Views.iOS.SKMetalView +#### Type Changed: SkiaSharp.Views.iOS.SKCanvasView + +Added method: ```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); -} +public override void WillMoveToWindow (UIKit.UIWindow window); +``` + + +#### Type Changed: SkiaSharp.Views.iOS.SKPaintGLSurfaceEventArgs + +Obsoleted constructors: + +```diff + [Obsolete ()] + public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.GRGlFramebufferInfo glInfo); ``` -#### New Type: SkiaSharp.Views.iOS.SKPaintMetalSurfaceEventArgs +Added constructors: ```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; } -} +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info); +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); ``` +Added properties: + +```csharp +public SkiaSharp.SKImageInfo Info { get; } +public SkiaSharp.SKImageInfo RawInfo { get; } +``` + + +#### Type Changed: SkiaSharp.Views.iOS.SKPaintSurfaceEventArgs + +Added constructor: + +```csharp +public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); +``` + +Added property: + +```csharp +public SkiaSharp.SKImageInfo RawInfo { get; } +``` + + diff --git a/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.tvOS.md b/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.tvOS.md index ddefe87c5ec..a5bfbb9b225 100644 --- a/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.tvOS.md +++ b/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.tvOS.md @@ -4,3 +4,54 @@ > Assembly Version Changed: 2.88.0.0 vs 2.80.0.0 +### Namespace SkiaSharp.Views.tvOS + +#### Type Changed: SkiaSharp.Views.tvOS.SKCanvasView + +Added method: + +```csharp +public override void WillMoveToWindow (UIKit.UIWindow window); +``` + + +#### Type Changed: SkiaSharp.Views.tvOS.SKPaintGLSurfaceEventArgs + +Obsoleted constructors: + +```diff + [Obsolete ()] + public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKColorType colorType, SkiaSharp.GRGlFramebufferInfo glInfo); +``` + +Added constructors: + +```csharp +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info); +public SKPaintGLSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.GRBackendRenderTarget renderTarget, SkiaSharp.GRSurfaceOrigin origin, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); +``` + +Added properties: + +```csharp +public SkiaSharp.SKImageInfo Info { get; } +public SkiaSharp.SKImageInfo RawInfo { get; } +``` + + +#### Type Changed: SkiaSharp.Views.tvOS.SKPaintSurfaceEventArgs + +Added constructor: + +```csharp +public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); +``` + +Added property: + +```csharp +public SkiaSharp.SKImageInfo RawInfo { get; } +``` + + + diff --git a/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.watchOS.md b/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.watchOS.md index ab97091ba2a..797d75a8860 100644 --- a/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.watchOS.md +++ b/changelogs/SkiaSharp.Views/2.88.0/SkiaSharp.Views.watchOS.md @@ -4,3 +4,21 @@ > Assembly Version Changed: 2.88.0.0 vs 2.80.0.0 +### Namespace SkiaSharp.Views.watchOS + +#### Type Changed: SkiaSharp.Views.watchOS.SKPaintSurfaceEventArgs + +Added constructor: + +```csharp +public SKPaintSurfaceEventArgs (SkiaSharp.SKSurface surface, SkiaSharp.SKImageInfo info, SkiaSharp.SKImageInfo rawInfo); +``` + +Added property: + +```csharp +public SkiaSharp.SKImageInfo RawInfo { get; } +``` + + + diff --git a/changelogs/SkiaSharp/2.88.0/SkiaSharp.breaking.md b/changelogs/SkiaSharp/2.88.0/SkiaSharp.breaking.md new file mode 100644 index 00000000000..41984e20a1a --- /dev/null +++ b/changelogs/SkiaSharp/2.88.0/SkiaSharp.breaking.md @@ -0,0 +1,19 @@ +# API diff: SkiaSharp.dll + +## SkiaSharp.dll + +> Assembly Version Changed: 2.88.0.0 vs 2.80.0.0 + +### Namespace SkiaSharp + +#### Type Changed: SkiaSharp.GRContext + +Modified base type: + +```diff +-SkiaSharp.SKObject ++SkiaSharp.GRRecordingContext +``` + + + diff --git a/changelogs/SkiaSharp/2.88.0/SkiaSharp.md b/changelogs/SkiaSharp/2.88.0/SkiaSharp.md index 5306749b850..4a9887a5258 100644 --- a/changelogs/SkiaSharp/2.88.0/SkiaSharp.md +++ b/changelogs/SkiaSharp/2.88.0/SkiaSharp.md @@ -17,28 +17,19 @@ Direct3D = 4, #### Type Changed: SkiaSharp.GRContext -Added property: +Modified base type: -```csharp -public bool IsAbandoned { get; } +```diff +-SkiaSharp.SKObject ++SkiaSharp.GRRecordingContext ``` 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); protected override void DisposeNative (); -``` - - -#### Type Changed: SkiaSharp.GRGlInterface - -Added method: - -```csharp -public static GRGlInterface CreateAngle (); +public void Flush (bool submit, bool synchronous); +public void Submit (bool synchronous); ``` @@ -63,6 +54,16 @@ Obsoleted properties: ``` +#### Type Changed: SkiaSharp.SKCanvas + +Added methods: + +```csharp +public void Clear (SKColorF color); +public void DrawColor (SKColorF color, SKBlendMode mode); +``` + + #### Type Changed: SkiaSharp.SKColorSpaceXyz Obsoleted properties: @@ -89,56 +90,54 @@ Bgra1010102 = 19, ``` -#### Type Changed: SkiaSharp.SKData - -Added property: - -```csharp -public System.Span Span { get; } -``` +#### Type Changed: SkiaSharp.SKImage 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); +public SKImage ApplyImageFilter (GRContext context, SKImageFilter filter, SKRectI subset, SKRectI clipBounds, out SKRectI outSubset, out SKPointI outOffset); +public SKImage ApplyImageFilter (GRRecordingContext context, SKImageFilter filter, SKRectI subset, SKRectI clipBounds, out SKRectI outSubset, out SKPointI outOffset); +public static SKImage FromAdoptedTexture (GRRecordingContext context, GRBackendTexture texture, SKColorType colorType); +public static SKImage FromAdoptedTexture (GRRecordingContext context, GRBackendTexture texture, GRSurfaceOrigin origin, SKColorType colorType); +public static SKImage FromAdoptedTexture (GRRecordingContext context, GRBackendTexture texture, GRSurfaceOrigin origin, SKColorType colorType, SKAlphaType alpha); +public static SKImage FromAdoptedTexture (GRRecordingContext context, GRBackendTexture texture, GRSurfaceOrigin origin, SKColorType colorType, SKAlphaType alpha, SKColorSpace colorspace); +public static SKImage FromTexture (GRRecordingContext context, GRBackendTexture texture, SKColorType colorType); +public static SKImage FromTexture (GRRecordingContext context, GRBackendTexture texture, GRSurfaceOrigin origin, SKColorType colorType); +public static SKImage FromTexture (GRRecordingContext context, GRBackendTexture texture, GRSurfaceOrigin origin, SKColorType colorType, SKAlphaType alpha); +public static SKImage FromTexture (GRRecordingContext context, GRBackendTexture texture, GRSurfaceOrigin origin, SKColorType colorType, SKAlphaType alpha, SKColorSpace colorspace); +public static SKImage FromTexture (GRRecordingContext context, GRBackendTexture texture, GRSurfaceOrigin origin, SKColorType colorType, SKAlphaType alpha, SKColorSpace colorspace, SKImageTextureReleaseDelegate releaseProc); +public static SKImage FromTexture (GRRecordingContext context, GRBackendTexture texture, GRSurfaceOrigin origin, SKColorType colorType, SKAlphaType alpha, SKColorSpace colorspace, SKImageTextureReleaseDelegate releaseProc, object releaseContext); +public bool IsValid (GRRecordingContext context); ``` -#### Type Changed: SkiaSharp.SKImage +#### Type Changed: SkiaSharp.SKImageFilter -Added property: +Added methods: ```csharp -public SKImageInfo Info { get; } +public static SKImageFilter CreateDilate (float radiusX, float radiusY, SKImageFilter input, SKImageFilter.CropRect cropRect); +public static SKImageFilter CreateErode (float radiusX, float radiusY, SKImageFilter input, SKImageFilter.CropRect cropRect); ``` + +#### Type Changed: SkiaSharp.SKPixmap + Added method: ```csharp -public SKImage ApplyImageFilter (GRContext context, SKImageFilter filter, SKRectI subset, SKRectI clipBounds, out SKRectI outSubset, out SKPointI outOffset); +public bool Erase (SKColorF color, SKColorSpace colorspace, SKRectI subset); ``` -#### Type Changed: SkiaSharp.SKPicture +#### Type Changed: SkiaSharp.SKSurface -Added methods: +Added property: ```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); +public GRRecordingContext Context { get; } ``` - -#### Type Changed: SkiaSharp.SKSurface - Obsoleted methods: ```diff @@ -160,26 +159,41 @@ Obsoleted methods: public static SKSurface CreateAsRenderTarget (GRContext context, GRBackendTexture texture, GRSurfaceOrigin origin, int sampleCount, SKColorType colorType, SKColorSpace colorspace, SKSurfaceProperties props); ``` -Added method: +Added methods: ```csharp -public void Flush (); +public static SKSurface Create (GRRecordingContext context, GRBackendRenderTarget renderTarget, SKColorType colorType); +public static SKSurface Create (GRRecordingContext context, GRBackendTexture texture, SKColorType colorType); +public static SKSurface Create (GRRecordingContext context, bool budgeted, SKImageInfo info); +public static SKSurface Create (GRRecordingContext context, GRBackendRenderTarget renderTarget, GRSurfaceOrigin origin, SKColorType colorType); +public static SKSurface Create (GRRecordingContext context, GRBackendRenderTarget renderTarget, SKColorType colorType, SKSurfaceProperties props); +public static SKSurface Create (GRRecordingContext context, GRBackendTexture texture, GRSurfaceOrigin origin, SKColorType colorType); +public static SKSurface Create (GRRecordingContext context, GRBackendTexture texture, SKColorType colorType, SKSurfaceProperties props); +public static SKSurface Create (GRRecordingContext context, bool budgeted, SKImageInfo info, SKSurfaceProperties props); +public static SKSurface Create (GRRecordingContext context, bool budgeted, SKImageInfo info, int sampleCount); +public static SKSurface Create (GRRecordingContext context, GRBackendRenderTarget renderTarget, GRSurfaceOrigin origin, SKColorType colorType, SKColorSpace colorspace); +public static SKSurface Create (GRRecordingContext context, GRBackendRenderTarget renderTarget, GRSurfaceOrigin origin, SKColorType colorType, SKSurfaceProperties props); +public static SKSurface Create (GRRecordingContext context, GRBackendTexture texture, GRSurfaceOrigin origin, SKColorType colorType, SKSurfaceProperties props); +public static SKSurface Create (GRRecordingContext context, GRBackendTexture texture, GRSurfaceOrigin origin, int sampleCount, SKColorType colorType); +public static SKSurface Create (GRRecordingContext context, bool budgeted, SKImageInfo info, int sampleCount, GRSurfaceOrigin origin); +public static SKSurface Create (GRRecordingContext context, bool budgeted, SKImageInfo info, int sampleCount, SKSurfaceProperties props); +public static SKSurface Create (GRRecordingContext context, GRBackendRenderTarget renderTarget, GRSurfaceOrigin origin, SKColorType colorType, SKColorSpace colorspace, SKSurfaceProperties props); +public static SKSurface Create (GRRecordingContext context, GRBackendTexture texture, GRSurfaceOrigin origin, int sampleCount, SKColorType colorType, SKColorSpace colorspace); +public static SKSurface Create (GRRecordingContext context, GRBackendTexture texture, GRSurfaceOrigin origin, int sampleCount, SKColorType colorType, SKSurfaceProperties props); +public static SKSurface Create (GRRecordingContext context, GRBackendTexture texture, GRSurfaceOrigin origin, int sampleCount, SKColorType colorType, SKColorSpace colorspace, SKSurfaceProperties props); +public static SKSurface Create (GRRecordingContext context, bool budgeted, SKImageInfo info, int sampleCount, GRSurfaceOrigin origin, SKSurfaceProperties props, bool shouldCreateWithMips); +public void Flush (bool submit, bool synchronous); ``` -#### New Type: SkiaSharp.GRContextOptions +#### New Type: SkiaSharp.GRRecordingContext ```csharp -public class GRContextOptions { - // constructors - public GRContextOptions (); +public class GRRecordingContext : SkiaSharp.SKObject, System.IDisposable { // 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; } + public GRBackend Backend { get; } + // methods + public int GetMaxSurfaceSampleCount (SKColorType colorType); } ``` @@ -261,3 +275,31 @@ public class SKRuntimeEffectUniforms : System.Collections.Generic.IEnumerable Factory { get; set; } + // methods + public static IPlatformLock Create (); + public static IPlatformLock DefaultFactory (); +} +``` + diff --git a/docs b/docs index c74cd3c5254..0c541ef2e84 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit c74cd3c5254d65997d92bf9d89732c6da5400f6e +Subproject commit 0c541ef2e84e17d3221284089a54d11ffa339601 diff --git a/nuget.config b/nuget.config index 2f5e995c3b0..6498dbc9a77 100644 --- a/nuget.config +++ b/nuget.config @@ -5,7 +5,5 @@ - - diff --git a/scripts/azure-pipelines-variables.yml b/scripts/azure-pipelines-variables.yml index 46c9c0bb24f..27b6b52a2ee 100644 --- a/scripts/azure-pipelines-variables.yml +++ b/scripts/azure-pipelines-variables.yml @@ -15,7 +15,7 @@ variables: XCODE_VERSION: 13.2.1 VISUAL_STUDIO_VERSION: '17/pre' DOTNET_VERSION_PREVIEW: '6.0.300' - DOTNET_WORKLOAD_SOURCE: 'https://aka.ms/dotnet/maui/6.0.300/rc.4.json' + DOTNET_WORKLOAD_SOURCE: 'https://aka.ms/dotnet/maui/6.0.300.json' CONFIGURATION: 'Release' DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true THROW_ON_TEST_FAILURE: true diff --git a/scripts/install-dotnet-workloads.ps1 b/scripts/install-dotnet-workloads.ps1 index 0c2ed0b3cc7..ddc3bdbb4b2 100644 --- a/scripts/install-dotnet-workloads.ps1 +++ b/scripts/install-dotnet-workloads.ps1 @@ -11,7 +11,7 @@ $previewRuntime = 'https://api.nuget.org/v3/index.json' $previewEmscripten = 'https://api.nuget.org/v3/index.json' if ($IsPreview) { $previewFeed = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json' - $previewRuntime = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-a21b9a2d/nuget/v3/index.json' + $previewRuntime = 'https://api.nuget.org/v3/index.json' $previewEmscripten = 'https://api.nuget.org/v3/index.json' } diff --git a/source/SkiaSharp.Build.targets b/source/SkiaSharp.Build.targets index 0b54fc7e168..b904632705d 100644 --- a/source/SkiaSharp.Build.targets +++ b/source/SkiaSharp.Build.targets @@ -59,7 +59,7 @@ - +