From ff7cc7823c3fe9d68d2977c75bbeb51cc0c1c94a Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 17 Oct 2019 14:29:31 +0200 Subject: [PATCH] Update the docs and reduce diff (#979) * Adding back some methods to reduce the breaking changes. * Making sure to force the use of VS2017 * Update all the docs * Keep the diff in the output * List the exported symbols on Linux --- VERSIONS.txt | 36 +- binding/Binding/GRBackendRenderTarget.cs | 3 + binding/Binding/GRBackendTexture.cs | 3 + binding/Binding/GRContext.cs | 5 +- binding/Binding/GRGlInterface.cs | 5 +- binding/Binding/SKAbstractManagedStream.cs | 3 + binding/Binding/SKAbstractManagedWStream.cs | 3 + binding/Binding/SKBitmap.cs | 3 + binding/Binding/SKCanvas.cs | 3 + binding/Binding/SKCodec.cs | 3 + binding/Binding/SKColorFilter.cs | 3 + binding/Binding/SKColorSpace.cs | 3 + binding/Binding/SKColorTable.cs | 3 + binding/Binding/SKData.cs | 3 + binding/Binding/SKDocument.cs | 3 + binding/Binding/SKDrawable.cs | 3 + binding/Binding/SKFontManager.cs | 3 + binding/Binding/SKFontStyle.cs | 3 + binding/Binding/SKFontStyleSet.cs | 3 + .../Binding/SKFrontBufferedManagedStream.cs | 3 + binding/Binding/SKImage.cs | 3 + binding/Binding/SKImageFilter.cs | 6 + binding/Binding/SKManagedStream.cs | 3 + binding/Binding/SKManagedWStream.cs | 3 + binding/Binding/SKMaskFilter.cs | 3 + binding/Binding/SKMatrix.cs | 14 +- binding/Binding/SKObject.cs | 3 + binding/Binding/SKPaint.cs | 3 + binding/Binding/SKPath.cs | 12 + binding/Binding/SKPathEffect.cs | 3 + binding/Binding/SKPathMeasure.cs | 3 + binding/Binding/SKPicture.cs | 3 + binding/Binding/SKPictureRecorder.cs | 3 + binding/Binding/SKPixmap.cs | 3 + binding/Binding/SKRegion.cs | 3 + binding/Binding/SKRoundRect.cs | 3 + binding/Binding/SKShader.cs | 3 + binding/Binding/SKStream.cs | 18 + binding/Binding/SKString.cs | 3 + binding/Binding/SKSurface.cs | 3 + binding/Binding/SKSurfaceProperties.cs | 3 + binding/Binding/SKTextBlob.cs | 6 + binding/Binding/SKTypeface.cs | 3 + binding/Binding/SKVertices.cs | 3 + binding/Binding/SKXml.cs | 3 + binding/HarfBuzzSharp.Shared/Blob.cs | 3 + binding/HarfBuzzSharp.Shared/Buffer.cs | 4 + binding/HarfBuzzSharp.Shared/Face.cs | 3 + binding/HarfBuzzSharp.Shared/Font.cs | 3 + binding/HarfBuzzSharp.Shared/FontFunctions.cs | 3 + .../HarfBuzzSharp.Shared/UnicodeFunctions.cs | 3 + build.cake | 16 +- cake/UpdateDocs.cake | 12 +- cake/UtilsManaged.cake | 16 +- .../HarfBuzzSharp.breaking.md | 0 .../{2.5.3 => 2.6.1}/HarfBuzzSharp.md | 86 +++-- changelogs/README.md | 18 +- .../1.68.1/SkiaSharp.Views.Forms.md | 349 ++++++++++++++++++ .../SkiaSharp/1.68.1/SkiaSharp.breaking.md | 42 +++ changelogs/SkiaSharp/1.68.1/SkiaSharp.md | 296 ++++++++++++++- docs | 2 +- scripts/azure-templates-native-linux.yml | 3 + source/SkiaSharp.Build.targets | 2 +- tools/packages.config | 2 +- 64 files changed, 1004 insertions(+), 72 deletions(-) rename changelogs/HarfBuzzSharp/{2.5.3 => 2.6.1}/HarfBuzzSharp.breaking.md (100%) rename changelogs/HarfBuzzSharp/{2.5.3 => 2.6.1}/HarfBuzzSharp.md (93%) create mode 100644 changelogs/SkiaSharp.Views.Forms.WPF/1.68.1/SkiaSharp.Views.Forms.md diff --git a/VERSIONS.txt b/VERSIONS.txt index 95699ab5..69a4e9ef 100644 --- a/VERSIONS.txt +++ b/VERSIONS.txt @@ -1,20 +1,24 @@ # dependencies -ANGLE.WindowsStore release 2.1.13 -mdoc.targets release 5.7.4.9 -mdoc release 5.7.4.9 -harfbuzz release 2.6.1 -skia release m68 -xunit release 2.4.1 -xunit.runner.console release 2.4.1 -Xamarin.Forms release 4.0.0.540366 -Tizen.NET release 4.0.0 -OpenTK release 3.0.1 -OpenTK.GLControl release 3.0.1 -MSBuild.Sdk.Extras release 1.6.65 -Cake release 0.31.0 -GtkSharp release 3.22.24.37 -GLibSharp release 3.22.24.37 -AtkSharp release 3.22.24.37 +ANGLE.WindowsStore release 2.1.13 +mdoc.targets release 5.7.4.10 +mdoc release 5.7.4.10 +harfbuzz release 2.6.1 +skia release m68 +xunit release 2.4.1 +xunit.runner.console release 2.4.1 +Xamarin.Forms release 4.0.0.540366 +Xamarin.Forms.Platform.WPF release 4.0.0.540366 +Tizen.NET release 4.0.0 +OpenTK release 3.0.1 +OpenTK.GLControl release 3.0.1 +MSBuild.Sdk.Extras release 1.6.65 +Cake release 0.35.0 +GtkSharp release 3.22.24.37 +GLibSharp release 3.22.24.37 +AtkSharp release 3.22.24.37 + +# additional references used by the tooling +OpenTK.GLControl reference 1.1.2349.61993 # native sonames libSkiaSharp soname 68.1.0 diff --git a/binding/Binding/GRBackendRenderTarget.cs b/binding/Binding/GRBackendRenderTarget.cs index 3b953626..907f17e7 100644 --- a/binding/Binding/GRBackendRenderTarget.cs +++ b/binding/Binding/GRBackendRenderTarget.cs @@ -43,6 +43,9 @@ namespace SkiaSharp } } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.gr_backendrendertarget_delete (Handle); diff --git a/binding/Binding/GRBackendTexture.cs b/binding/Binding/GRBackendTexture.cs index bf4e4efe..f92313bb 100644 --- a/binding/Binding/GRBackendTexture.cs +++ b/binding/Binding/GRBackendTexture.cs @@ -48,6 +48,9 @@ namespace SkiaSharp } } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.gr_backendtexture_delete (Handle); diff --git a/binding/Binding/GRContext.cs b/binding/Binding/GRContext.cs index 5be7b372..53338147 100644 --- a/binding/Binding/GRContext.cs +++ b/binding/Binding/GRContext.cs @@ -9,7 +9,10 @@ namespace SkiaSharp : base (h, owns) { } - + + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + public static GRContext Create (GRBackend backend) { switch (backend) { diff --git a/binding/Binding/GRGlInterface.cs b/binding/Binding/GRGlInterface.cs index f638b0b4..a6d56594 100644 --- a/binding/Binding/GRGlInterface.cs +++ b/binding/Binding/GRGlInterface.cs @@ -12,7 +12,10 @@ namespace SkiaSharp : base (h, owns) { } - + + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + public static GRGlInterface CreateDefaultInterface () { // first try ANGLE, then fall back to the OpenGL-based diff --git a/binding/Binding/SKAbstractManagedStream.cs b/binding/Binding/SKAbstractManagedStream.cs index 46b54a2e..ae12f798 100644 --- a/binding/Binding/SKAbstractManagedStream.cs +++ b/binding/Binding/SKAbstractManagedStream.cs @@ -93,6 +93,9 @@ namespace SkiaSharp Handle = SkiaApi.sk_managedstream_new (ctx); } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () { if (Interlocked.CompareExchange (ref fromNative, 0, 0) == 0) diff --git a/binding/Binding/SKAbstractManagedWStream.cs b/binding/Binding/SKAbstractManagedWStream.cs index 610de834..4a8550d6 100644 --- a/binding/Binding/SKAbstractManagedWStream.cs +++ b/binding/Binding/SKAbstractManagedWStream.cs @@ -53,6 +53,9 @@ namespace SkiaSharp Handle = SkiaApi.sk_managedwstream_new (ctx); } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () { if (Interlocked.CompareExchange (ref fromNative, 0, 0) == 0) diff --git a/binding/Binding/SKBitmap.cs b/binding/Binding/SKBitmap.cs index 1e2e663b..4271155f 100644 --- a/binding/Binding/SKBitmap.cs +++ b/binding/Binding/SKBitmap.cs @@ -101,6 +101,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_bitmap_destructor (Handle); diff --git a/binding/Binding/SKCanvas.cs b/binding/Binding/SKCanvas.cs index b980de4e..8fed2779 100644 --- a/binding/Binding/SKCanvas.cs +++ b/binding/Binding/SKCanvas.cs @@ -29,6 +29,9 @@ namespace SkiaSharp Handle = SkiaApi.sk_canvas_new_from_bitmap (bitmap.Handle); } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_canvas_destroy (Handle); diff --git a/binding/Binding/SKCodec.cs b/binding/Binding/SKCodec.cs index d3867561..65968ce9 100644 --- a/binding/Binding/SKCodec.cs +++ b/binding/Binding/SKCodec.cs @@ -14,6 +14,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_codec_destroy (Handle); diff --git a/binding/Binding/SKColorFilter.cs b/binding/Binding/SKColorFilter.cs index e1c46267..1ca39cf2 100644 --- a/binding/Binding/SKColorFilter.cs +++ b/binding/Binding/SKColorFilter.cs @@ -15,6 +15,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + public static SKColorFilter CreateBlendMode(SKColor c, SKBlendMode mode) { return GetObject(SkiaApi.sk_colorfilter_new_mode(c, mode)); diff --git a/binding/Binding/SKColorSpace.cs b/binding/Binding/SKColorSpace.cs index 27bd4f8a..cb7ae48b 100644 --- a/binding/Binding/SKColorSpace.cs +++ b/binding/Binding/SKColorSpace.cs @@ -199,6 +199,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + public bool GammaIsCloseToSrgb => SkiaApi.sk_colorspace_gamma_close_to_srgb (Handle); public bool GammaIsLinear => SkiaApi.sk_colorspace_gamma_is_linear (Handle); diff --git a/binding/Binding/SKColorTable.cs b/binding/Binding/SKColorTable.cs index 0a8da913..7df8f126 100644 --- a/binding/Binding/SKColorTable.cs +++ b/binding/Binding/SKColorTable.cs @@ -47,6 +47,9 @@ namespace SkiaSharp } } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + public int Count => SkiaApi.sk_colortable_count (Handle); public SKPMColor[] Colors diff --git a/binding/Binding/SKData.cs b/binding/Binding/SKData.cs index 07e1e879..daa9469d 100644 --- a/binding/Binding/SKData.cs +++ b/binding/Binding/SKData.cs @@ -32,6 +32,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + void ISKNonVirtualReferenceCounted.ReferenceNative () => SkiaApi.sk_data_ref (Handle); void ISKNonVirtualReferenceCounted.UnreferenceNative () => SkiaApi.sk_data_unref (Handle); diff --git a/binding/Binding/SKDocument.cs b/binding/Binding/SKDocument.cs index 7325f38d..2dc7e483 100644 --- a/binding/Binding/SKDocument.cs +++ b/binding/Binding/SKDocument.cs @@ -16,6 +16,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + public void Abort () => SkiaApi.sk_document_abort (Handle); diff --git a/binding/Binding/SKDrawable.cs b/binding/Binding/SKDrawable.cs index a2dd981b..4ccde493 100644 --- a/binding/Binding/SKDrawable.cs +++ b/binding/Binding/SKDrawable.cs @@ -62,6 +62,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () { if (Interlocked.CompareExchange (ref fromNative, 0, 0) == 0) diff --git a/binding/Binding/SKFontManager.cs b/binding/Binding/SKFontManager.cs index a225ae59..23a08db1 100644 --- a/binding/Binding/SKFontManager.cs +++ b/binding/Binding/SKFontManager.cs @@ -26,6 +26,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + public static SKFontManager Default => defaultManager.Value; public int FontFamilyCount => SkiaApi.sk_fontmgr_count_families (Handle); diff --git a/binding/Binding/SKFontStyle.cs b/binding/Binding/SKFontStyle.cs index 652a3229..8b553d36 100644 --- a/binding/Binding/SKFontStyle.cs +++ b/binding/Binding/SKFontStyle.cs @@ -25,6 +25,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_fontstyle_delete (Handle); diff --git a/binding/Binding/SKFontStyleSet.cs b/binding/Binding/SKFontStyleSet.cs index 2880511f..c666328e 100644 --- a/binding/Binding/SKFontStyleSet.cs +++ b/binding/Binding/SKFontStyleSet.cs @@ -17,6 +17,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + public int Count => SkiaApi.sk_fontstyleset_get_count (Handle); public SKFontStyle this[int index] => GetStyle (index); diff --git a/binding/Binding/SKFrontBufferedManagedStream.cs b/binding/Binding/SKFrontBufferedManagedStream.cs index da08909d..f39c54e6 100644 --- a/binding/Binding/SKFrontBufferedManagedStream.cs +++ b/binding/Binding/SKFrontBufferedManagedStream.cs @@ -46,6 +46,9 @@ namespace SkiaSharp frontBuffer = new byte[bufferSize]; } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeManaged () { if (disposeStream && stream != null) { diff --git a/binding/Binding/SKImage.cs b/binding/Binding/SKImage.cs index 3cd6bc18..c27a7d86 100644 --- a/binding/Binding/SKImage.cs +++ b/binding/Binding/SKImage.cs @@ -20,6 +20,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + // create brand new image public static SKImage Create (SKImageInfo info) diff --git a/binding/Binding/SKImageFilter.cs b/binding/Binding/SKImageFilter.cs index 1aee9850..72373039 100644 --- a/binding/Binding/SKImageFilter.cs +++ b/binding/Binding/SKImageFilter.cs @@ -15,6 +15,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + public static SKImageFilter CreateMatrix(SKMatrix matrix, SKFilterQuality quality, SKImageFilter input = null) { return GetObject(SkiaApi.sk_imagefilter_new_matrix(ref matrix, quality, input == null ? IntPtr.Zero : input.Handle)); @@ -229,6 +232,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_imagefilter_croprect_destructor (Handle); diff --git a/binding/Binding/SKManagedStream.cs b/binding/Binding/SKManagedStream.cs index b1ee1366..9a07ebd0 100644 --- a/binding/Binding/SKManagedStream.cs +++ b/binding/Binding/SKManagedStream.cs @@ -52,6 +52,9 @@ namespace SkiaSharp } } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeManaged () { var childStream = child?.Target as SKManagedStream; diff --git a/binding/Binding/SKManagedWStream.cs b/binding/Binding/SKManagedWStream.cs index 190926de..241db1bd 100644 --- a/binding/Binding/SKManagedWStream.cs +++ b/binding/Binding/SKManagedWStream.cs @@ -26,6 +26,9 @@ namespace SkiaSharp disposeStream = disposeManagedStream; } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeManaged () { if (disposeStream && stream != null) { diff --git a/binding/Binding/SKMaskFilter.cs b/binding/Binding/SKMaskFilter.cs index b609de79..737c5366 100644 --- a/binding/Binding/SKMaskFilter.cs +++ b/binding/Binding/SKMaskFilter.cs @@ -27,6 +27,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + public static float ConvertRadiusToSigma(float radius) { return radius > 0 ? BlurSigmaScale * radius + 0.5f : 0.0f; diff --git a/binding/Binding/SKMatrix.cs b/binding/Binding/SKMatrix.cs index 80d9e505..d8167b93 100644 --- a/binding/Binding/SKMatrix.cs +++ b/binding/Binding/SKMatrix.cs @@ -491,9 +491,6 @@ typeMask = Mask.Scale | Mask.RectStaysRect { } - protected override void DisposeNative () => - SkiaApi.sk_3dview_destroy (Handle); - public SK3dView () : this (SkiaApi.sk_3dview_new (), true) { @@ -501,7 +498,13 @@ typeMask = Mask.Scale | Mask.RectStaysRect throw new InvalidOperationException ("Unable to create a new SK3dView instance."); } } - + + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + + protected override void DisposeNative () => + SkiaApi.sk_3dview_destroy (Handle); + public SKMatrix Matrix { get { SKMatrix matrix = SKMatrix.MakeIdentity (); @@ -597,6 +600,9 @@ typeMask = Mask.Scale | Mask.RectStaysRect { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_matrix44_destroy (Handle); diff --git a/binding/Binding/SKObject.cs b/binding/Binding/SKObject.cs index d4461f8b..2abbff29 100644 --- a/binding/Binding/SKObject.cs +++ b/binding/Binding/SKObject.cs @@ -36,6 +36,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + public override IntPtr Handle { get => base.Handle; protected set { diff --git a/binding/Binding/SKPaint.cs b/binding/Binding/SKPaint.cs index 7aa87761..6a7efa57 100644 --- a/binding/Binding/SKPaint.cs +++ b/binding/Binding/SKPaint.cs @@ -18,6 +18,9 @@ namespace SkiaSharp } } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_paint_delete (Handle); diff --git a/binding/Binding/SKPath.cs b/binding/Binding/SKPath.cs index fab53f5a..3998721b 100644 --- a/binding/Binding/SKPath.cs +++ b/binding/Binding/SKPath.cs @@ -43,6 +43,9 @@ namespace SkiaSharp } } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_path_delete (Handle); @@ -467,6 +470,9 @@ namespace SkiaSharp this.path = path; } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_path_iter_destroy (Handle); @@ -497,6 +503,9 @@ namespace SkiaSharp this.path = path; } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_path_rawiter_destroy (Handle); @@ -533,6 +542,9 @@ namespace SkiaSharp return SkiaApi.sk_opbuilder_resolve (Handle, result.Handle); } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_opbuilder_destroy (Handle); } diff --git a/binding/Binding/SKPathEffect.cs b/binding/Binding/SKPathEffect.cs index 76eb3e86..78448f5d 100644 --- a/binding/Binding/SKPathEffect.cs +++ b/binding/Binding/SKPathEffect.cs @@ -23,6 +23,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + public static SKPathEffect CreateCompose(SKPathEffect outer, SKPathEffect inner) { if (outer == null) diff --git a/binding/Binding/SKPathMeasure.cs b/binding/Binding/SKPathMeasure.cs index a701c41a..dfe6826f 100644 --- a/binding/Binding/SKPathMeasure.cs +++ b/binding/Binding/SKPathMeasure.cs @@ -34,6 +34,9 @@ namespace SkiaSharp } } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_pathmeasure_destroy (Handle); diff --git a/binding/Binding/SKPicture.cs b/binding/Binding/SKPicture.cs index 76393d62..c0ff66a7 100644 --- a/binding/Binding/SKPicture.cs +++ b/binding/Binding/SKPicture.cs @@ -10,6 +10,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + public uint UniqueId => SkiaApi.sk_picture_get_unique_id (Handle); public SKRect CullRect { diff --git a/binding/Binding/SKPictureRecorder.cs b/binding/Binding/SKPictureRecorder.cs index 589263fb..fb98f074 100644 --- a/binding/Binding/SKPictureRecorder.cs +++ b/binding/Binding/SKPictureRecorder.cs @@ -18,6 +18,9 @@ namespace SkiaSharp } } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_picture_recorder_delete (Handle); diff --git a/binding/Binding/SKPixmap.cs b/binding/Binding/SKPixmap.cs index 88bdc71c..c9aee54e 100644 --- a/binding/Binding/SKPixmap.cs +++ b/binding/Binding/SKPixmap.cs @@ -41,6 +41,9 @@ namespace SkiaSharp } } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_pixmap_destructor (Handle); diff --git a/binding/Binding/SKRegion.cs b/binding/Binding/SKRegion.cs index b7f52ed5..48dbe8c2 100644 --- a/binding/Binding/SKRegion.cs +++ b/binding/Binding/SKRegion.cs @@ -32,6 +32,9 @@ namespace SkiaSharp SetPath (path); } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_region_delete (Handle); diff --git a/binding/Binding/SKRoundRect.cs b/binding/Binding/SKRoundRect.cs index e55b9bc1..2aa2ec67 100644 --- a/binding/Binding/SKRoundRect.cs +++ b/binding/Binding/SKRoundRect.cs @@ -42,6 +42,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_rrect_delete (Handle); diff --git a/binding/Binding/SKShader.cs b/binding/Binding/SKShader.cs index 32b7012f..e1083d8b 100644 --- a/binding/Binding/SKShader.cs +++ b/binding/Binding/SKShader.cs @@ -10,6 +10,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + public static SKShader CreateEmpty () { return GetObject (SkiaApi.sk_shader_new_empty ()); diff --git a/binding/Binding/SKStream.cs b/binding/Binding/SKStream.cs index c95d228f..ec5a5b70 100644 --- a/binding/Binding/SKStream.cs +++ b/binding/Binding/SKStream.cs @@ -186,6 +186,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_stream_destroy (Handle); } @@ -222,6 +225,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_stream_asset_destroy (Handle); } @@ -250,6 +256,9 @@ namespace SkiaSharp } } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_filestream_destroy (Handle); @@ -314,6 +323,9 @@ namespace SkiaSharp SetMemory (data); } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_memorystream_destroy (Handle); @@ -451,6 +463,9 @@ namespace SkiaSharp } } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_filewstream_destroy (Handle); @@ -514,6 +529,9 @@ namespace SkiaSharp return SkiaApi.sk_dynamicmemorywstream_write_to_stream (Handle, dst.Handle); } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_dynamicmemorywstream_destroy (Handle); } diff --git a/binding/Binding/SKString.cs b/binding/Binding/SKString.cs index 19a9eef3..163c4eb2 100644 --- a/binding/Binding/SKString.cs +++ b/binding/Binding/SKString.cs @@ -57,6 +57,9 @@ namespace SkiaSharp return new SKString (str); } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_string_destructor (Handle); } diff --git a/binding/Binding/SKSurface.cs b/binding/Binding/SKSurface.cs index e6f15e47..e7f47b62 100644 --- a/binding/Binding/SKSurface.cs +++ b/binding/Binding/SKSurface.cs @@ -20,6 +20,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + // RASTER surface [Obsolete ("Use Create(SKImageInfo, SKSurfaceProperties) instead.")] diff --git a/binding/Binding/SKSurfaceProperties.cs b/binding/Binding/SKSurfaceProperties.cs index 7852dc23..c2c4bf15 100644 --- a/binding/Binding/SKSurfaceProperties.cs +++ b/binding/Binding/SKSurfaceProperties.cs @@ -31,6 +31,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_surfaceprops_delete (Handle); diff --git a/binding/Binding/SKTextBlob.cs b/binding/Binding/SKTextBlob.cs index 31be1132..12a59475 100644 --- a/binding/Binding/SKTextBlob.cs +++ b/binding/Binding/SKTextBlob.cs @@ -10,6 +10,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + void ISKNonVirtualReferenceCounted.ReferenceNative () => SkiaApi.sk_textblob_ref (Handle); void ISKNonVirtualReferenceCounted.UnreferenceNative () => SkiaApi.sk_textblob_unref (Handle); @@ -37,6 +40,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_textblob_builder_delete (Handle); diff --git a/binding/Binding/SKTypeface.cs b/binding/Binding/SKTypeface.cs index bbd4b5c5..bab45f8b 100644 --- a/binding/Binding/SKTypeface.cs +++ b/binding/Binding/SKTypeface.cs @@ -34,6 +34,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + public static SKTypeface Default => defaultTypeface.Value; public static SKTypeface CreateDefault () diff --git a/binding/Binding/SKVertices.cs b/binding/Binding/SKVertices.cs index 5d51cb00..e98d5c6d 100644 --- a/binding/Binding/SKVertices.cs +++ b/binding/Binding/SKVertices.cs @@ -14,6 +14,9 @@ namespace SkiaSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + void ISKNonVirtualReferenceCounted.ReferenceNative () => SkiaApi.sk_vertices_ref (Handle); void ISKNonVirtualReferenceCounted.UnreferenceNative () => SkiaApi.sk_vertices_unref (Handle); diff --git a/binding/Binding/SKXml.cs b/binding/Binding/SKXml.cs index 7d7e4b65..7aaaa0fa 100644 --- a/binding/Binding/SKXml.cs +++ b/binding/Binding/SKXml.cs @@ -28,6 +28,9 @@ namespace SkiaSharp Handle = SkiaApi.sk_xmlstreamwriter_new (stream.Handle); } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeNative () => SkiaApi.sk_xmlstreamwriter_delete (Handle); } diff --git a/binding/HarfBuzzSharp.Shared/Blob.cs b/binding/HarfBuzzSharp.Shared/Blob.cs index 25b3878e..caaac23c 100644 --- a/binding/HarfBuzzSharp.Shared/Blob.cs +++ b/binding/HarfBuzzSharp.Shared/Blob.cs @@ -30,6 +30,9 @@ namespace HarfBuzzSharp { } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeHandler () { if (Handle != IntPtr.Zero) { diff --git a/binding/HarfBuzzSharp.Shared/Buffer.cs b/binding/HarfBuzzSharp.Shared/Buffer.cs index c3eb8a7a..e78092eb 100644 --- a/binding/HarfBuzzSharp.Shared/Buffer.cs +++ b/binding/HarfBuzzSharp.Shared/Buffer.cs @@ -351,6 +351,10 @@ namespace HarfBuzzSharp HarfBuzzApi.hb_buffer_deserialize_glyphs (Handle, data, -1, out _, font?.Handle ?? IntPtr.Zero, format); } + + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeHandler () { if (Handle != IntPtr.Zero) { diff --git a/binding/HarfBuzzSharp.Shared/Face.cs b/binding/HarfBuzzSharp.Shared/Face.cs index f4e5d270..119068fc 100644 --- a/binding/HarfBuzzSharp.Shared/Face.cs +++ b/binding/HarfBuzzSharp.Shared/Face.cs @@ -83,6 +83,9 @@ namespace HarfBuzzSharp public void MakeImmutable () => HarfBuzzApi.hb_face_make_immutable (Handle); + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeHandler () { if (Handle != IntPtr.Zero) { diff --git a/binding/HarfBuzzSharp.Shared/Font.cs b/binding/HarfBuzzSharp.Shared/Font.cs index 5b7fbeb0..27559dba 100644 --- a/binding/HarfBuzzSharp.Shared/Font.cs +++ b/binding/HarfBuzzSharp.Shared/Font.cs @@ -254,6 +254,9 @@ namespace HarfBuzzSharp Marshal.FreeCoTaskMem (shapersPtr); } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeHandler () { if (Handle != IntPtr.Zero) { diff --git a/binding/HarfBuzzSharp.Shared/FontFunctions.cs b/binding/HarfBuzzSharp.Shared/FontFunctions.cs index cd10aec7..e86ddc9a 100644 --- a/binding/HarfBuzzSharp.Shared/FontFunctions.cs +++ b/binding/HarfBuzzSharp.Shared/FontFunctions.cs @@ -182,6 +182,9 @@ namespace HarfBuzzSharp Handle, DelegateProxies.GlyphFromNameProxy, ctx, DelegateProxies.ReleaseDelegateProxyForMulti); } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeHandler () { if (Handle != IntPtr.Zero) { diff --git a/binding/HarfBuzzSharp.Shared/UnicodeFunctions.cs b/binding/HarfBuzzSharp.Shared/UnicodeFunctions.cs index 212a235d..df8fe789 100644 --- a/binding/HarfBuzzSharp.Shared/UnicodeFunctions.cs +++ b/binding/HarfBuzzSharp.Shared/UnicodeFunctions.cs @@ -112,6 +112,9 @@ namespace HarfBuzzSharp throw new InvalidOperationException ($"{nameof (UnicodeFunctions)} is immutable and can't be changed."); } + protected override void Dispose (bool disposing) => + base.Dispose (disposing); + protected override void DisposeHandler () { if (Handle != IntPtr.Zero) { diff --git a/build.cake b/build.cake index c7fab796..d7a02fe3 100644 --- a/build.cake +++ b/build.cake @@ -1,13 +1,13 @@ -#addin nuget:?package=Cake.Xamarin&version=3.0.0 -#addin nuget:?package=Cake.XCode&version=4.0.0 -#addin nuget:?package=Cake.FileHelpers&version=3.1.0 -#addin nuget:?package=SharpCompress&version=0.22.0 -#addin nuget:?package=Mono.ApiTools.NuGetDiff&version=1.0.0&loaddependencies=true +#addin nuget:?package=Cake.Xamarin&version=3.0.2 +#addin nuget:?package=Cake.XCode&version=4.2.0 +#addin nuget:?package=Cake.FileHelpers&version=3.2.1 +#addin nuget:?package=SharpCompress&version=0.24.0 +#addin nuget:?package=Mono.ApiTools.NuGetDiff&version=1.1.0-preview.1&prerelease&loaddependencies=true #addin nuget:?package=Xamarin.Nuget.Validator&version=1.1.1 -#tool nuget:?package=mdoc&version=5.7.4.9 +#tool nuget:?package=mdoc&version=5.7.4.10 #tool nuget:?package=xunit.runner.console&version=2.4.1 -#tool nuget:?package=vswhere&version=2.5.2 +#tool nuget:?package=vswhere&version=2.7.1 using System.Linq; using System.Net.Http; @@ -495,6 +495,8 @@ Task ("Nothing"); Task ("CI") .IsDependentOn ("externals") .IsDependentOn ("libs") + .IsDependentOn ("nuget") + .IsDependentOn ("docs-api-diff") .IsDependentOn ("nuget-validation") .IsDependentOn ("tests") .IsDependentOn ("samples"); diff --git a/cake/UpdateDocs.cake b/cake/UpdateDocs.cake index e9b6b317..9e580418 100644 --- a/cake/UpdateDocs.cake +++ b/cake/UpdateDocs.cake @@ -61,7 +61,7 @@ Task ("docs-download-output") Task ("docs-api-diff") .Does (async () => { - var baseDir = "./output/api-diff"; + var baseDir = "./output/nugets/api-diff"; CleanDirectories (baseDir); var comparer = await CreateNuGetDiffAsync (); @@ -98,9 +98,6 @@ Task ("docs-api-diff") Information ($"Diff complete of '{id}'."); } - - // clean up after working - CleanDirectories (baseDir); }); Task ("docs-api-diff-past") @@ -186,7 +183,12 @@ Task ("docs-update-frameworks") foreach (var (path, platform) in GetPlatformDirectories ($"{packagePath}/lib")) { string moniker; - if (id.StartsWith ("SkiaSharp.Views") && !id.StartsWith ("SkiaSharp.Views.Forms")) + if (id.StartsWith ("SkiaSharp.Views.Forms")) + if (id != "SkiaSharp.Views.Forms") + continue; + else + moniker = $"skiasharp-views-forms-{version}"; + else if (id.StartsWith ("SkiaSharp.Views")) moniker = $"skiasharp-views-{version}"; else if (platform == null) moniker = $"{id.ToLower ().Replace (".", "-")}-{version}"; diff --git a/cake/UtilsManaged.cake b/cake/UtilsManaged.cake index b6bca036..1c128d6e 100644 --- a/cake/UtilsManaged.cake +++ b/cake/UtilsManaged.cake @@ -13,6 +13,7 @@ void RunMSBuild ( MSBuild (solution, c => { c.Configuration = CONFIGURATION; c.Verbosity = VERBOSITY; + c.ToolVersion = MSBuildToolVersion.VS2017; if (restoreOnly) { c.Targets.Clear(); @@ -363,12 +364,7 @@ async Task CreateNuGetDiffAsync () comparer.SearchPaths.AddRange (GetReferenceSearchPaths ()); comparer.PackageCache = PACKAGE_CACHE_PATH.FullPath; - var AddDep = new Func (async (id, platform) => { - var version = GetVersion (id, "release"); - var root = await comparer.ExtractCachedPackageAsync(id, version); - comparer.SearchPaths.Add(System.IO.Path.Combine(root, "lib", platform)); - }); - + await AddDep ("OpenTK.GLControl", "NET40", "reference"); await AddDep ("OpenTK.GLControl", "NET40"); await AddDep ("Tizen.NET", "netstandard2.0"); await AddDep ("Xamarin.Forms", "netstandard2.0"); @@ -377,9 +373,17 @@ async Task CreateNuGetDiffAsync () await AddDep ("Xamarin.Forms", "Xamarin.Mac"); await AddDep ("Xamarin.Forms", "tizen40"); await AddDep ("Xamarin.Forms", "uap10.0"); + await AddDep ("Xamarin.Forms.Platform.WPF", "net45"); await AddDep ("GtkSharp", "netstandard2.0"); await AddDep ("GLibSharp", "netstandard2.0"); await AddDep ("AtkSharp", "netstandard2.0"); return comparer; + + async Task AddDep(string id, string platform, string type = "release") + { + var version = GetVersion (id, type); + var root = await comparer.ExtractCachedPackageAsync(id, version); + comparer.SearchPaths.Add(System.IO.Path.Combine(root, "lib", platform)); + } } diff --git a/changelogs/HarfBuzzSharp/2.5.3/HarfBuzzSharp.breaking.md b/changelogs/HarfBuzzSharp/2.6.1/HarfBuzzSharp.breaking.md similarity index 100% rename from changelogs/HarfBuzzSharp/2.5.3/HarfBuzzSharp.breaking.md rename to changelogs/HarfBuzzSharp/2.6.1/HarfBuzzSharp.breaking.md diff --git a/changelogs/HarfBuzzSharp/2.5.3/HarfBuzzSharp.md b/changelogs/HarfBuzzSharp/2.6.1/HarfBuzzSharp.md similarity index 93% rename from changelogs/HarfBuzzSharp/2.5.3/HarfBuzzSharp.md rename to changelogs/HarfBuzzSharp/2.6.1/HarfBuzzSharp.md index 161ee159..a0772fe3 100644 --- a/changelogs/HarfBuzzSharp/2.5.3/HarfBuzzSharp.md +++ b/changelogs/HarfBuzzSharp/2.6.1/HarfBuzzSharp.md @@ -29,12 +29,6 @@ public bool IsImmutable { get; } public int Length { get; } ``` -Removed method: - -```csharp -protected override void Dispose (bool disposing); -``` - Added methods: ```csharp @@ -74,18 +68,14 @@ public Script Script { get; set; } public UnicodeFunctions UnicodeFunctions { get; set; } ``` -Removed method: - -```csharp -protected override void Dispose (bool disposing); -``` - Added methods: ```csharp public void Add (uint codepoint, uint cluster); +public void AddCodepoints (System.ReadOnlySpan text); public void AddCodepoints (System.ReadOnlySpan text); public void AddCodepoints (IntPtr text, int textLength); +public void AddCodepoints (System.ReadOnlySpan text, int itemOffset, int itemLength); public void AddCodepoints (System.ReadOnlySpan text, int itemOffset, int itemLength); public void AddCodepoints (IntPtr text, int textLength, int itemOffset, int itemLength); public void AddUtf16 (System.ReadOnlySpan text); @@ -96,9 +86,11 @@ public void AddUtf16 (System.ReadOnlySpan text, int itemOffset, int itemLe public void AddUtf16 (string text, int itemOffset, int itemLength); public void AddUtf16 (IntPtr text, int textLength, int itemOffset, int itemLength); public void AddUtf32 (System.ReadOnlySpan text); +public void AddUtf32 (System.ReadOnlySpan text); public void AddUtf32 (System.ReadOnlySpan text); public void AddUtf32 (string text); public void AddUtf32 (IntPtr text, int textLength); +public void AddUtf32 (System.ReadOnlySpan text, int itemOffset, int itemLength); public void AddUtf32 (System.ReadOnlySpan text, int itemOffset, int itemLength); public void AddUtf32 (IntPtr text, int textLength, int itemOffset, int itemLength); public void AddUtf8 (System.ReadOnlySpan text); @@ -154,12 +146,6 @@ public bool IsImmutable { get; } public Tag[] Tables { get; } ``` -Removed method: - -```csharp -protected override void Dispose (bool disposing); -``` - Added methods: ```csharp @@ -206,16 +192,11 @@ public Font (Font parent); Added properties: ```csharp +public OpenTypeMetrics OpenTypeMetrics { get; } public Font Parent { get; } public string[] SupportedShapers { get; } ``` -Removed method: - -```csharp -protected override void Dispose (bool disposing); -``` - Added methods: ```csharp @@ -236,7 +217,9 @@ public void SetFontFunctions (FontFunctions fontFunctions); public void SetFontFunctions (FontFunctions fontFunctions, object fontData); public void SetFontFunctions (FontFunctions fontFunctions, object fontData, ReleaseDelegate destroy); public void Shape (Buffer buffer, System.Collections.Generic.IReadOnlyList features, System.Collections.Generic.IReadOnlyList shapers); +public bool TryGetGlyph (int unicode, out uint glyph); public bool TryGetGlyph (uint unicode, out uint glyph); +public bool TryGetGlyph (int unicode, uint variationSelector, out uint glyph); public bool TryGetGlyph (uint unicode, uint variationSelector, out uint glyph); public bool TryGetGlyphContourPoint (uint glyph, uint pointIndex, out int x, out int y); public bool TryGetGlyphContourPointForOrigin (uint glyph, uint pointIndex, Direction direction, out int x, out int y); @@ -246,8 +229,11 @@ public bool TryGetGlyphFromString (string s, out uint glyph); public bool TryGetGlyphName (uint glyph, out string name); public bool TryGetHorizontalFontExtents (out FontExtents extents); public bool TryGetHorizontalGlyphOrigin (uint glyph, out int xOrigin, out int yOrigin); +public bool TryGetNominalGlyph (int unicode, out uint glyph); public bool TryGetNominalGlyph (uint unicode, out uint glyph); +public bool TryGetVariationGlyph (int unicode, out uint glyph); public bool TryGetVariationGlyph (uint unicode, out uint glyph); +public bool TryGetVariationGlyph (int unicode, uint variationSelector, out uint glyph); public bool TryGetVariationGlyph (uint unicode, uint variationSelector, out uint glyph); public bool TryGetVerticalFontExtents (out FontExtents extents); public bool TryGetVerticalGlyphOrigin (uint glyph, out int xOrigin, out int yOrigin); @@ -383,6 +369,7 @@ public class FontFunctions : HarfBuzzSharp.NativeObject, System.IDisposable { public static FontFunctions Empty { get; } public bool IsImmutable { get; } // methods + protected override void Dispose (bool disposing); protected override void DisposeHandler (); public void MakeImmutable (); public void SetGlyphContourPointDelegate (GlyphContourPointDelegate del, ReleaseDelegate destroy); @@ -613,6 +600,56 @@ public sealed delegate NominalGlyphsDelegate : System.MulticastDelegate, System. } ``` +#### New Type: HarfBuzzSharp.OpenTypeMetrics + +```csharp +public struct OpenTypeMetrics { + // constructors + public OpenTypeMetrics (IntPtr font); + // methods + public float GetVariation (OpenTypeMetricsTag metricsTag); + public int GetXVariation (OpenTypeMetricsTag metricsTag); + public int GetYVariation (OpenTypeMetricsTag metricsTag); + public bool TryGetPosition (OpenTypeMetricsTag metricsTag, out int position); +} +``` + +#### New Type: HarfBuzzSharp.OpenTypeMetricsTag + +```csharp +[Serializable] +public enum OpenTypeMetricsTag { + CapHeight = 1668311156, + HorizontalAscender = 1751216995, + HorizontalCaretOffset = 1751347046, + HorizontalCaretRise = 1751347827, + HorizontalCaretRun = 1751347822, + HorizontalClippingAscent = 1751346273, + HorizontalClippingDescent = 1751346276, + HorizontalDescender = 1751413603, + HorizontalLineGap = 1751934832, + StrikeoutOffset = 1937011311, + StrikeoutSize = 1937011315, + SubScriptEmXOffset = 1935833199, + SubScriptEmXSize = 1935833203, + SubScriptEmYOffset = 1935833455, + SubScriptEmYSize = 1935833459, + SuperScriptEmXOffset = 1936750703, + SuperScriptEmXSize = 1936750707, + SuperScriptEmYOffset = 1936750959, + SuperScriptEmYSize = 1936750963, + UnderlineOffset = 1970168943, + UnderlineSize = 1970168947, + VerticalAscender = 1986098019, + VerticalCaretOffset = 1986228070, + VerticalCaretRise = 1986228851, + VerticalCaretRun = 1986228846, + VerticalDescender = 1986294627, + VerticalLineGap = 1986815856, + XHeight = 2020108148, +} +``` + #### New Type: HarfBuzzSharp.ReleaseDelegate ```csharp @@ -934,6 +971,7 @@ public class UnicodeFunctions : HarfBuzzSharp.NativeObject, System.IDisposable { public bool IsImmutable { get; } public UnicodeFunctions Parent { get; } // methods + protected override void Dispose (bool disposing); protected override void DisposeHandler (); public UnicodeCombiningClass GetCombiningClass (uint unicode); public UnicodeGeneralCategory GetGeneralCategory (uint unicode); diff --git a/changelogs/README.md b/changelogs/README.md index 48002c74..5d1ee4e4 100644 --- a/changelogs/README.md +++ b/changelogs/README.md @@ -3,7 +3,21 @@ In this directory, there are is set of sub-folders for each NuGet package - each containing a set of API diffs for each release. * **[SkiaSharp](SkiaSharp)** - * **[SkiaSharp.Views](SkiaSharp.Views)** - * **[SkiaSharp.Views.Forms](SkiaSharp.Views.Forms)** * **[SkiaSharp.HarfBuzz](SkiaSharp.HarfBuzz)** * **[HarfBuzzSharp](HarfBuzzSharp)** + +There are also diffs for the various views. + +For **Xamarin.Forms**: + + * **[SkiaSharp.Views.Forms](SkiaSharp.Views.Forms)** + * **[SkiaSharp.Views.Forms.WPF](SkiaSharp.Views.Forms.WPF)** + +For **native** platforms: + + * **[SkiaSharp.Views](SkiaSharp.Views)** + * **[SkiaSharp.Views.Desktop.Common](SkiaSharp.Views.Desktop.Common)** + * **[SkiaSharp.Views.Gtk2](SkiaSharp.Views.Gtk2)** + * **[SkiaSharp.Views.Gtk3](SkiaSharp.Views.Gtk3)** + * **[SkiaSharp.Views.WindowsForms](SkiaSharp.Views.WindowsForms)** + * **[SkiaSharp.Views.WPF](SkiaSharp.Views.WPF)** diff --git a/changelogs/SkiaSharp.Views.Forms.WPF/1.68.1/SkiaSharp.Views.Forms.md b/changelogs/SkiaSharp.Views.Forms.WPF/1.68.1/SkiaSharp.Views.Forms.md new file mode 100644 index 00000000..4bc8773a --- /dev/null +++ b/changelogs/SkiaSharp.Views.Forms.WPF/1.68.1/SkiaSharp.Views.Forms.md @@ -0,0 +1,349 @@ +# API diff: SkiaSharp.Views.Forms.dll + +## SkiaSharp.Views.Forms.dll + +> Assembly Version Changed: 1.68.0.0 vs 0.0.0.0 + +### New Namespace SkiaSharp.Views.Forms + +#### New Type: SkiaSharp.Views.Forms.Extensions + +```csharp +public static class Extensions { + // methods + public static Xamarin.Forms.Color ToFormsColor (this SkiaSharp.SKColor color); + public static Xamarin.Forms.Point ToFormsPoint (this SkiaSharp.SKPoint point); + public static Xamarin.Forms.Point ToFormsPoint (this SkiaSharp.SKPointI point); + public static Xamarin.Forms.Rectangle ToFormsRect (this SkiaSharp.SKRect rect); + public static Xamarin.Forms.Rectangle ToFormsRect (this SkiaSharp.SKRectI rect); + public static Xamarin.Forms.Size ToFormsSize (this SkiaSharp.SKSize size); + public static Xamarin.Forms.Size ToFormsSize (this SkiaSharp.SKSizeI size); + public static SkiaSharp.SKColor ToSKColor (this Xamarin.Forms.Color color); + public static SkiaSharp.SKPoint ToSKPoint (this Xamarin.Forms.Point point); + public static SkiaSharp.SKRect ToSKRect (this Xamarin.Forms.Rectangle rect); + public static SkiaSharp.SKSize ToSKSize (this Xamarin.Forms.Size size); +} +``` + +#### New Type: SkiaSharp.Views.Forms.GetPropertyValueEventArgs`1 + +```csharp +public class GetPropertyValueEventArgs`1 : System.EventArgs { + // constructors + public GetPropertyValueEventArgs`1 (); + // properties + public T Value { get; set; } +} +``` + +#### New Type: SkiaSharp.Views.Forms.ISKCanvasViewController + +```csharp +public interface ISKCanvasViewController : Xamarin.Forms.IElementController, Xamarin.Forms.IViewController, Xamarin.Forms.IVisualElementController { + // events + public event System.EventHandler> GetCanvasSize; + public event System.EventHandler SurfaceInvalidated; + // methods + public virtual void OnPaintSurface (SKPaintSurfaceEventArgs e); + public virtual void OnTouch (SKTouchEventArgs e); +} +``` + +#### New Type: SkiaSharp.Views.Forms.SKBitmapImageSource + +```csharp +public sealed class SKBitmapImageSource : Xamarin.Forms.ImageSource, System.ComponentModel.INotifyPropertyChanged, Xamarin.Forms.IElementController, Xamarin.Forms.Internals.IDynamicResourceHandler, Xamarin.Forms.Internals.INameScope { + // constructors + public SKBitmapImageSource (); + // fields + public static Xamarin.Forms.BindableProperty BitmapProperty; + // properties + public SkiaSharp.SKBitmap Bitmap { get; set; } + // methods + public override System.Threading.Tasks.Task Cancel (); + protected override void OnPropertyChanged (string propertyName); + public static SKBitmapImageSource op_Implicit (SkiaSharp.SKBitmap bitmap); + public static SkiaSharp.SKBitmap op_Implicit (SKBitmapImageSource source); +} +``` + +#### New Type: SkiaSharp.Views.Forms.SKCanvasView + +```csharp +public class SKCanvasView : Xamarin.Forms.View, ISKCanvasViewController, System.ComponentModel.INotifyPropertyChanged, Xamarin.Forms.IAnimatable, Xamarin.Forms.IElementController, Xamarin.Forms.ITabStopElement, Xamarin.Forms.IViewController, Xamarin.Forms.IVisualElementController, Xamarin.Forms.Internals.IDynamicResourceHandler, Xamarin.Forms.Internals.IGestureController, Xamarin.Forms.Internals.INameScope, Xamarin.Forms.Internals.INavigationProxy { + // constructors + public SKCanvasView (); + // fields + public static Xamarin.Forms.BindableProperty EnableTouchEventsProperty; + public static Xamarin.Forms.BindableProperty IgnorePixelScalingProperty; + // properties + public SkiaSharp.SKSize CanvasSize { get; } + public bool EnableTouchEvents { get; set; } + public bool IgnorePixelScaling { get; set; } + // events + public event System.EventHandler PaintSurface; + public event System.EventHandler Touch; + // methods + public void InvalidateSurface (); + protected override Xamarin.Forms.SizeRequest OnMeasure (double widthConstraint, double heightConstraint); + protected virtual void OnPaintSurface (SKPaintSurfaceEventArgs e); + protected virtual void OnTouch (SKTouchEventArgs e); +} +``` + +#### New Type: SkiaSharp.Views.Forms.SKCanvasViewRenderer + +```csharp +public class SKCanvasViewRenderer : SkiaSharp.Views.Forms.SKCanvasViewRendererBase`2[SkiaSharp.Views.Forms.SKCanvasView,SkiaSharp.Views.WPF.SKElement], System.IDisposable, Xamarin.Forms.IEffectControlProvider, Xamarin.Forms.IRegisterable, Xamarin.Forms.Platform.WPF.IVisualElementRenderer { + // constructors + public SKCanvasViewRenderer (); +} +``` + +#### New Type: SkiaSharp.Views.Forms.SKCanvasViewRendererBase`2 + +```csharp +public abstract class SKCanvasViewRendererBase`2 : Xamarin.Forms.Platform.WPF.ViewRenderer`2[TFormsView,TNativeView], System.IDisposable, Xamarin.Forms.IEffectControlProvider, Xamarin.Forms.IRegisterable, Xamarin.Forms.Platform.WPF.IVisualElementRenderer { + // constructors + protected SKCanvasViewRendererBase`2 (); + // methods + protected virtual TNativeView CreateNativeControl (); + protected override void Dispose (bool disposing); + protected override void OnElementChanged (Xamarin.Forms.Platform.WPF.ElementChangedEventArgs e); + protected override void OnElementPropertyChanged (object sender, System.ComponentModel.PropertyChangedEventArgs e); +} +``` + +#### New Type: SkiaSharp.Views.Forms.SKGLView + +```csharp +public class SKGLView : Xamarin.Forms.View, System.ComponentModel.INotifyPropertyChanged, Xamarin.Forms.IAnimatable, Xamarin.Forms.IElementController, Xamarin.Forms.ITabStopElement, Xamarin.Forms.IViewController, Xamarin.Forms.IVisualElementController, Xamarin.Forms.Internals.IDynamicResourceHandler, Xamarin.Forms.Internals.IGestureController, Xamarin.Forms.Internals.INameScope, Xamarin.Forms.Internals.INavigationProxy { + // constructors + public SKGLView (); + // fields + public static Xamarin.Forms.BindableProperty EnableTouchEventsProperty; + public static Xamarin.Forms.BindableProperty HasRenderLoopProperty; + // properties + public SkiaSharp.SKSize CanvasSize { get; } + public bool EnableTouchEvents { get; set; } + public SkiaSharp.GRContext GRContext { get; } + public bool HasRenderLoop { get; set; } + // events + public event System.EventHandler PaintSurface; + public event System.EventHandler Touch; + // methods + public void InvalidateSurface (); + protected override Xamarin.Forms.SizeRequest OnMeasure (double widthConstraint, double heightConstraint); + protected virtual void OnPaintSurface (SKPaintGLSurfaceEventArgs e); + protected virtual void OnTouch (SKTouchEventArgs e); +} +``` + +#### New Type: SkiaSharp.Views.Forms.SKGLViewRenderer + +```csharp +public class SKGLViewRenderer : SkiaSharp.Views.Forms.SKGLViewRendererBase`2[SkiaSharp.Views.Forms.SKGLView,SkiaSharp.Views.Forms.SKHostedGLControl], System.IDisposable, Xamarin.Forms.IEffectControlProvider, Xamarin.Forms.IRegisterable, Xamarin.Forms.Platform.WPF.IVisualElementRenderer { + // constructors + public SKGLViewRenderer (); + // methods + protected override void Dispose (bool disposing); + protected override void SetupRenderLoop (bool oneShot); +} +``` + +#### New Type: SkiaSharp.Views.Forms.SKGLViewRendererBase`2 + +```csharp +public abstract class SKGLViewRendererBase`2 : Xamarin.Forms.Platform.WPF.ViewRenderer`2[TFormsView,TNativeView], System.IDisposable, Xamarin.Forms.IEffectControlProvider, Xamarin.Forms.IRegisterable, Xamarin.Forms.Platform.WPF.IVisualElementRenderer { + // constructors + protected SKGLViewRendererBase`2 (); + // properties + public SkiaSharp.GRContext GRContext { get; } + // methods + protected virtual TNativeView CreateNativeControl (); + protected override void Dispose (bool disposing); + protected override void OnElementChanged (Xamarin.Forms.Platform.WPF.ElementChangedEventArgs e); + protected override void OnElementPropertyChanged (object sender, System.ComponentModel.PropertyChangedEventArgs e); + protected virtual void SetupRenderLoop (bool oneShot); +} +``` + +#### New Type: SkiaSharp.Views.Forms.SKHostedGLControl + +```csharp +public class SKHostedGLControl : System.Windows.Forms.Integration.WindowsFormsHost, System.ComponentModel.ISupportInitialize, System.IDisposable, System.Windows.IFrameworkInputElement, System.Windows.IInputElement, System.Windows.Interop.IKeyboardInputSink, System.Windows.Interop.IWin32Window, System.Windows.Markup.IQueryAmbient, System.Windows.Media.Animation.IAnimatable { + // constructors + public SKHostedGLControl (); + public SKHostedGLControl (OpenTK.Graphics.GraphicsMode mode); + public SKHostedGLControl (OpenTK.Graphics.GraphicsMode mode, int major, int minor, OpenTK.Graphics.GraphicsContextFlags flags); + // properties + public SkiaSharp.SKSize CanvasSize { get; } + public SkiaSharp.Views.Desktop.SKGLControl GLControl { get; } + public SkiaSharp.GRContext GRContext { get; } + // events + public event System.EventHandler PaintSurface; + // methods + public void Initialize (SkiaSharp.Views.Desktop.SKGLControl control); + public void Invalidate (); +} +``` + +#### New Type: SkiaSharp.Views.Forms.SKImageImageSource + +```csharp +public sealed class SKImageImageSource : Xamarin.Forms.ImageSource, System.ComponentModel.INotifyPropertyChanged, Xamarin.Forms.IElementController, Xamarin.Forms.Internals.IDynamicResourceHandler, Xamarin.Forms.Internals.INameScope { + // constructors + public SKImageImageSource (); + // fields + public static Xamarin.Forms.BindableProperty ImageProperty; + // properties + public SkiaSharp.SKImage Image { get; set; } + // methods + public override System.Threading.Tasks.Task Cancel (); + protected override void OnPropertyChanged (string propertyName); + public static SKImageImageSource op_Implicit (SkiaSharp.SKImage image); + public static SkiaSharp.SKImage op_Implicit (SKImageImageSource source); +} +``` + +#### New Type: SkiaSharp.Views.Forms.SKImageSourceHandler + +```csharp +public sealed class SKImageSourceHandler : Xamarin.Forms.IRegisterable, Xamarin.Forms.Platform.WPF.IImageSourceHandler { + // constructors + public SKImageSourceHandler (); + // methods + public virtual System.Threading.Tasks.Task LoadImageAsync (Xamarin.Forms.ImageSource imagesource, System.Threading.CancellationToken cancelationToken); +} +``` + +#### New Type: SkiaSharp.Views.Forms.SKMouseButton + +```csharp +[Serializable] +public enum SKMouseButton { + Left = 1, + Middle = 2, + Right = 3, + Unknown = 0, +} +``` + +#### New Type: SkiaSharp.Views.Forms.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); + // 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.Forms.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.Forms.SKPictureImageSource + +```csharp +public sealed class SKPictureImageSource : Xamarin.Forms.ImageSource, System.ComponentModel.INotifyPropertyChanged, Xamarin.Forms.IElementController, Xamarin.Forms.Internals.IDynamicResourceHandler, Xamarin.Forms.Internals.INameScope { + // constructors + public SKPictureImageSource (); + // fields + public static Xamarin.Forms.BindableProperty DimensionsProperty; + public static Xamarin.Forms.BindableProperty PictureProperty; + // properties + public SkiaSharp.SKSizeI Dimensions { get; set; } + public SkiaSharp.SKPicture Picture { get; set; } + // methods + public override System.Threading.Tasks.Task Cancel (); + protected override void OnPropertyChanged (string propertyName); + public static SkiaSharp.SKPicture op_Explicit (SKPictureImageSource source); +} +``` + +#### New Type: SkiaSharp.Views.Forms.SKPixmapImageSource + +```csharp +public sealed class SKPixmapImageSource : Xamarin.Forms.ImageSource, System.ComponentModel.INotifyPropertyChanged, Xamarin.Forms.IElementController, Xamarin.Forms.Internals.IDynamicResourceHandler, Xamarin.Forms.Internals.INameScope { + // constructors + public SKPixmapImageSource (); + // fields + public static Xamarin.Forms.BindableProperty PixmapProperty; + // properties + public SkiaSharp.SKPixmap Pixmap { get; set; } + // methods + public override System.Threading.Tasks.Task Cancel (); + protected override void OnPropertyChanged (string propertyName); + public static SKPixmapImageSource op_Implicit (SkiaSharp.SKPixmap pixmap); + public static SkiaSharp.SKPixmap op_Implicit (SKPixmapImageSource source); +} +``` + +#### New Type: SkiaSharp.Views.Forms.SKTouchAction + +```csharp +[Serializable] +public enum SKTouchAction { + Cancelled = 4, + Entered = 0, + Exited = 5, + Moved = 2, + Pressed = 1, + Released = 3, + WheelChanged = 6, +} +``` + +#### New Type: SkiaSharp.Views.Forms.SKTouchDeviceType + +```csharp +[Serializable] +public enum SKTouchDeviceType { + Mouse = 1, + Pen = 2, + Touch = 0, +} +``` + +#### New Type: SkiaSharp.Views.Forms.SKTouchEventArgs + +```csharp +public class SKTouchEventArgs : System.EventArgs { + // constructors + public SKTouchEventArgs (long id, SKTouchAction type, SkiaSharp.SKPoint location, bool inContact); + public SKTouchEventArgs (long id, SKTouchAction type, SKMouseButton mouseButton, SKTouchDeviceType deviceType, SkiaSharp.SKPoint location, bool inContact); + public SKTouchEventArgs (long id, SKTouchAction type, SKMouseButton mouseButton, SKTouchDeviceType deviceType, SkiaSharp.SKPoint location, bool inContact, int wheelDelta); + // properties + public SKTouchAction ActionType { get; } + public SKTouchDeviceType DeviceType { get; } + public bool Handled { get; set; } + public long Id { get; } + public bool InContact { get; } + public SkiaSharp.SKPoint Location { get; } + public SKMouseButton MouseButton { get; } + public int WheelDelta { get; } + // methods + public override string ToString (); +} +``` + diff --git a/changelogs/SkiaSharp/1.68.1/SkiaSharp.breaking.md b/changelogs/SkiaSharp/1.68.1/SkiaSharp.breaking.md index 0064d9e8..011fab42 100644 --- a/changelogs/SkiaSharp/1.68.1/SkiaSharp.breaking.md +++ b/changelogs/SkiaSharp/1.68.1/SkiaSharp.breaking.md @@ -16,6 +16,48 @@ Modified methods: ``` +#### Type Changed: SkiaSharp.SKObject + +Removed property: + +```csharp +protected bool OwnsHandle { get; } +``` + + +#### Type Changed: SkiaSharp.SKPath + +#### Type Changed: SkiaSharp.SKPath.Iterator + +Modified base type: + +```diff +-SkiaSharp.SKNativeObject ++SkiaSharp.SKObject +``` + + +#### Type Changed: SkiaSharp.SKPath.OpBuilder + +Modified base type: + +```diff +-SkiaSharp.SKNativeObject ++SkiaSharp.SKObject +``` + + +#### Type Changed: SkiaSharp.SKPath.RawIterator + +Modified base type: + +```diff +-SkiaSharp.SKNativeObject ++SkiaSharp.SKObject +``` + + + #### Type Changed: SkiaSharp.SKTextBlobBuilder Modified methods: diff --git a/changelogs/SkiaSharp/1.68.1/SkiaSharp.md b/changelogs/SkiaSharp/1.68.1/SkiaSharp.md index 28e5c403..0b1081cb 100644 --- a/changelogs/SkiaSharp/1.68.1/SkiaSharp.md +++ b/changelogs/SkiaSharp/1.68.1/SkiaSharp.md @@ -4,11 +4,59 @@ ### Namespace SkiaSharp -#### Type Changed: SkiaSharp.SKBitmap +#### Type Changed: SkiaSharp.GRBackendRenderTarget Added method: ```csharp +protected override void DisposeNative (); +``` + + +#### Type Changed: SkiaSharp.GRBackendTexture + +Added method: + +```csharp +protected override void DisposeNative (); +``` + + +#### Type Changed: SkiaSharp.SK3dView + +Added method: + +```csharp +protected override void DisposeNative (); +``` + + +#### Type Changed: SkiaSharp.SKAbstractManagedStream + +Added methods: + +```csharp +protected override void DisposeNative (); +protected virtual IntPtr OnDuplicate (); +protected virtual IntPtr OnFork (); +``` + + +#### Type Changed: SkiaSharp.SKAbstractManagedWStream + +Added method: + +```csharp +protected override void DisposeNative (); +``` + + +#### Type Changed: SkiaSharp.SKBitmap + +Added methods: + +```csharp +protected override void DisposeNative (); public System.ReadOnlySpan GetPixelSpan (); ``` @@ -18,12 +66,22 @@ public System.ReadOnlySpan GetPixelSpan (); Added methods: ```csharp +protected override void DisposeNative (); public void DrawDrawable (SKDrawable drawable, ref SKMatrix matrix); public void DrawDrawable (SKDrawable drawable, SKPoint p); public void DrawDrawable (SKDrawable drawable, float x, float y); ``` +#### Type Changed: SkiaSharp.SKCodec + +Added method: + +```csharp +protected override void DisposeNative (); +``` + + #### Type Changed: SkiaSharp.SKColorSpace Added properties: @@ -116,6 +174,51 @@ public static SKData CreateCopy (System.ReadOnlySpan bytes); ``` +#### Type Changed: SkiaSharp.SKDynamicMemoryWStream + +Added method: + +```csharp +protected override void DisposeNative (); +``` + + +#### Type Changed: SkiaSharp.SKFileStream + +Added method: + +```csharp +protected override void DisposeNative (); +``` + + +#### Type Changed: SkiaSharp.SKFileWStream + +Added method: + +```csharp +protected override void DisposeNative (); +``` + + +#### Type Changed: SkiaSharp.SKFontStyle + +Added method: + +```csharp +protected override void DisposeNative (); +``` + + +#### Type Changed: SkiaSharp.SKFrontBufferedManagedStream + +Added method: + +```csharp +protected override void DisposeManaged (); +``` + + #### Type Changed: SkiaSharp.SKImage Added methods: @@ -127,6 +230,40 @@ public static SKImage FromPixelCopy (SKImageInfo info, System.ReadOnlySpan ``` +#### Type Changed: SkiaSharp.SKImageFilter + +#### Type Changed: SkiaSharp.SKImageFilter.CropRect + +Added method: + +```csharp +protected override void DisposeNative (); +``` + + + +#### Type Changed: SkiaSharp.SKManagedStream + +Added methods: + +```csharp +public int CopyTo (SKWStream destination); +protected override void DisposeManaged (); +protected override IntPtr OnDuplicate (); +protected override IntPtr OnFork (); +public SKStreamAsset ToMemoryStream (); +``` + + +#### Type Changed: SkiaSharp.SKManagedWStream + +Added method: + +```csharp +protected override void DisposeManaged (); +``` + + #### Type Changed: SkiaSharp.SKMatrix Added constructor: @@ -136,6 +273,59 @@ public SKMatrix (float scaleX, float skewX, float transX, float skewY, float sca ``` +#### Type Changed: SkiaSharp.SKMatrix44 + +Added method: + +```csharp +protected override void DisposeNative (); +``` + + +#### Type Changed: SkiaSharp.SKMemoryStream + +Added method: + +```csharp +protected override void DisposeNative (); +``` + + +#### Type Changed: SkiaSharp.SKNativeObject + +Added properties: + +```csharp +protected bool IgnorePublicDispose { get; set; } +protected bool IsDisposed { get; } +protected virtual bool OwnsHandle { get; set; } +``` + +Added methods: + +```csharp +protected void DisposeInternal (); +protected virtual void DisposeManaged (); +protected virtual void DisposeNative (); +``` + + +#### Type Changed: SkiaSharp.SKObject + +Removed property: + +```csharp +protected bool OwnsHandle { get; } +``` + +Added methods: + +```csharp +protected override void DisposeManaged (); +protected override void DisposeNative (); +``` + + #### Type Changed: SkiaSharp.SKPaint Added methods: @@ -145,6 +335,7 @@ public long BreakText (IntPtr buffer, int length, float maxWidth); public long BreakText (IntPtr buffer, int length, float maxWidth, out float measuredWidth); public bool ContainsGlyphs (IntPtr text, IntPtr length); public int CountGlyphs (IntPtr text, IntPtr length); +protected override void DisposeNative (); public float[] GetGlyphWidths (IntPtr text, IntPtr length); public float[] GetGlyphWidths (IntPtr text, IntPtr length, out SKRect[] bounds); public ushort[] GetGlyphs (IntPtr text, IntPtr length); @@ -159,20 +350,88 @@ public void Reset (); ``` -#### Type Changed: SkiaSharp.SKPictureRecorder +#### Type Changed: SkiaSharp.SKPath Added method: ```csharp +protected override void DisposeNative (); +``` + +#### Type Changed: SkiaSharp.SKPath.Iterator + +Modified base type: + +```diff +-SkiaSharp.SKNativeObject ++SkiaSharp.SKObject +``` + +Added method: + +```csharp +protected override void DisposeNative (); +``` + + +#### Type Changed: SkiaSharp.SKPath.OpBuilder + +Modified base type: + +```diff +-SkiaSharp.SKNativeObject ++SkiaSharp.SKObject +``` + +Added method: + +```csharp +protected override void DisposeNative (); +``` + + +#### Type Changed: SkiaSharp.SKPath.RawIterator + +Modified base type: + +```diff +-SkiaSharp.SKNativeObject ++SkiaSharp.SKObject +``` + +Added method: + +```csharp +protected override void DisposeNative (); +``` + + + +#### Type Changed: SkiaSharp.SKPathMeasure + +Added method: + +```csharp +protected override void DisposeNative (); +``` + + +#### Type Changed: SkiaSharp.SKPictureRecorder + +Added methods: + +```csharp +protected override void DisposeNative (); public SKDrawable EndRecordingAsDrawable (); ``` #### Type Changed: SkiaSharp.SKPixmap -Added method: +Added methods: ```csharp +protected override void DisposeNative (); public System.ReadOnlySpan GetPixelSpan (); ``` @@ -189,11 +448,31 @@ public SKRegion (SKRectI rect); Added methods: ```csharp +protected override void Dispose (bool disposing); +protected override void DisposeNative (); public bool Intersects (SKPath path); public bool Op (SKPath path, SKRegionOperation op); ``` +#### Type Changed: SkiaSharp.SKRoundRect + +Added method: + +```csharp +protected override void DisposeNative (); +``` + + +#### Type Changed: SkiaSharp.SKSurfaceProperties + +Added method: + +```csharp +protected override void DisposeNative (); +``` + + #### Type Changed: SkiaSharp.SKSwizzle Added methods: @@ -250,6 +529,7 @@ public SKRunBuffer AllocateRun (SKPaint font, int count, float x, float y); public SKRunBuffer AllocateRun (SKPaint font, int count, float x, float y, int textByteCount); public SKRunBuffer AllocateRun (SKPaint font, int count, float x, float y, SKRect? bounds); public SKRunBuffer AllocateRun (SKPaint font, int count, float x, float y, int textByteCount, SKRect? bounds); +protected override void DisposeNative (); ``` @@ -273,6 +553,15 @@ public bool TryGetTableTags (out uint[] tags); ``` +#### Type Changed: SkiaSharp.SKXmlStreamWriter + +Added method: + +```csharp +protected override void DisposeNative (); +``` + + #### New Type: SkiaSharp.SKColorSpaceType ```csharp @@ -296,6 +585,7 @@ public class SKDrawable : SkiaSharp.SKObject, System.IDisposable { public uint GenerationId { get; } // methods protected override void Dispose (bool disposing); + protected override void DisposeNative (); public void Draw (SKCanvas canvas, ref SKMatrix matrix); public void Draw (SKCanvas canvas, float x, float y); public void NotifyDrawingChanged (); diff --git a/docs b/docs index 31ef21f8..264694bd 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 31ef21f823907fc59eceb42c1fdd760cf9c35fd1 +Subproject commit 264694bd78ecf745ea1a41c15038403e996ea2de diff --git a/scripts/azure-templates-native-linux.yml b/scripts/azure-templates-native-linux.yml index ab747125..f2b4fb9b 100644 --- a/scripts/azure-templates-native-linux.yml +++ b/scripts/azure-templates-native-linux.yml @@ -50,6 +50,9 @@ jobs: - bash: | find output/native/linux -type f -name "*.so" -print0 | xargs -0 ldd -v displayName: List the dependencies for the native binaries + - bash: | + find output/native/linux -type f -name "*.so" -print0 | xargs -0 readelf -Ws | grep GLOBAL + displayName: List the exported symbols for the native binaries # post-build steps - ${{ parameters.postBuildSteps }} # publish artifacts diff --git a/source/SkiaSharp.Build.targets b/source/SkiaSharp.Build.targets index d186ba36..8444e676 100644 --- a/source/SkiaSharp.Build.targets +++ b/source/SkiaSharp.Build.targets @@ -41,7 +41,7 @@ - +