Version 1.68.2
1.68.2 stable · Released April 30, 2020 · NuGet · GitHub Release
API changes · SkiaSharp API diff · HarfBuzzSharp API diff
Highlights
SkiaSharp 1.68.2 lands after nine previews with view lifecycle fixes, new APIs and platform work across the board. This release tightens view lifetime and disposal on every UI backend, adds writable pixel spans, SKColorF/SKColorSpace overloads, more SKImage/SKRegion members and improved Perlin noise shaders, and brings in community fixes for WPF, UWP, macOS and Android views. HarfBuzzSharp is refreshed to 2.6.1.2.
Breaking Changes
None in this release.
API Surface
- Writable pixel spans and SKColorF overloads — Exposes a generic, writable Span
over pixel memory and adds SKColorF variants (with SKColorSpace) across the paint and canvas APIs for wide-gamut work. (#1242, #1116) - More SKImage, SKRegion and SKCanvas members bound — Rounds out SKImage, SKRegion and SKCanvas by binding members that were previously missing from the managed surface. (#1126, #1125, #1090)
- Improved Perlin noise shader — Adds an SKShader factory for the improved Perlin noise variant, matching Skia's newer noise generator. (#1056)
- .NET-style method renames — Renames a handful of methods to follow .NET conventions so the managed surface reads more naturally. (#1255)
- Merge-filter factories accept nulls — The merge image-filter factory overloads now accept null arguments, matching the semantics of the underlying Skia API. — ❤️ @ziriax (#1185)
Bug Fixes
- View lifecycle and disposal reworked — Reworks the view classes across UI stacks to avoid incorrect disposal, releases Skia objects when views unload, and fixes queued-redraw and double-load issues. (#1180, #1213, #1135, #1133)
- UWP, Android, macOS and WPF fixes — Fixes broken antialiasing on the UWP SKSwapChainPanel, refreshes the Android surface when recreated, corrects macOS SKGLView issues, and adds mouse-wheel touch events to WPF. — ❤️ @validvoid, @alexandrvslv (#1086, #1234, #1083, #1079)
- SKTouchHandler crash and disposal fixes — Fixes a touch-handler crash caused by an incorrect parameter (also adding pressure and eraser handling) and corrects SKGLViewRenderer disposal. — ❤️ @mscherotter, @zbyszekpy (#1212, #1095)
- Concurrency and system-font handling — Resolves several concurrency issues in shared object caches and stops system fonts from being disposed by the managed layer. (#1200, #1224)
- GL and rendering corrections — Makes sure GL contexts are made current before drawing, fixes text-encoding handling in paint, and adds a text-alignment regression test. (#1141, #1152, #1207, #1143)
Lifecycle & Internals
- Reflection removed from SKObject creation — Replaces reflection-based construction of SKObject wrappers with direct instantiation, reducing startup cost and helping AOT scenarios. — ❤️ @Gillibald (#1209)
- Preserve attribute dropped; GC-safety hardened — Removes the linker-only [Preserve] attribute and pins 'this' and pixel buffers during native calls so the GC cannot move them mid-draw. (#1229, #1258, #1256, #1257)
Platform
- GTK views for Xamarin.Forms and Tizen overload — Adds GTK view backends for Xamarin.Forms and the overload that newer versions of XF.Tizen expect. (#1089, #1117)
- Windows Forms multi-targeting and ANGLE via vcpkg — Multi-targets SkiaSharp.Views.Windows.Forms and moves the ANGLE native build to vcpkg for a more reliable Windows toolchain. (#1082, #1158)
- Xamarin.Forms 4.2 and always-referenced netstandard — Updates the bundled Xamarin.Forms baseline to 4.2.0.910310 and always references netstandard so downstream targets resolve consistently. (#1109, #1250)
Security
- Bundled expat updated to 2.2.9 — Refreshes the bundled expat native library to 2.2.9, picking up the security fixes shipped by upstream. (#1214)
HarfBuzzSharp 2.6.1.2
Refreshes HarfBuzzSharp to 2.6.1.2 with the native build modernisation, buffer-overflow cherry-picks and general binding polish carried into 1.68.2.
Community Contributors ❤️
Thank you to everyone who contributed to this release!
| Contributor | Contributions |
|---|---|
| @bender2k14 | Sample cleanups carried over from 1.68.1.1 — dropped an unused TaskScheduler argument and simplified the rotation matrix initialisation (#1062, #1063) |
| @mscherotter | Fixed an SKTouchHandler crash and added touch-device type (touch, mouse, pen) with pressure and eraser handling (#1191, #1212) |
| @alexandrvslv | Added mouse-wheel touch events on WPF (#1079) |
| @daltonks | Cleaned up WeakReference tracking so TryRemove clears the stored reference (#1039) |
| @Gillibald | Removed reflection usage in SKObject creation (#1209) |
| @terrajobst | Contributed an improvement that landed in this release (#1216) |
| @validvoid | Fixed broken antialiasing on the UWP SKSwapChainPanel (#1086) |
| @zbyszekpy | Corrected SKGLViewRenderer disposal (#1095) |
| @ziriax | Made the merge image-filter factory overloads accept null arguments (#1185) |
Preview 60 (April 13, 2020)
Preview 60 was the final preview before stable, folding in the GC-safety pinning fixes and last view lifecycle corrections.
Preview 50 (April 3, 2020)
Preview 50 finished the view lifetime rework and added the writable pixel Span and .NET-style renames.
Preview 45 (March 24, 2020)
Preview 45 landed the Android surface-recreate fix and further Xamarin.Forms/WPF corrections.
Preview 43 (March 15, 2020)
Preview 43 removed reflection from SKObject creation and dropped the [Preserve] attribute.
Preview 39 (February 27, 2020)
Preview 39 added the expat 2.2.9 refresh, touch-handler improvements and the WPF mouse-wheel touch event.
Preview 29 (February 6, 2020)
Preview 29 brought the GTK Xamarin.Forms views, macOS SKGLView fixes and Windows Forms multi-targeting.
Preview 21 (January 19, 2020)
Preview 21 added the SKColorF/SKColorSpace overloads and more SKImage, SKRegion and SKCanvas members.
Preview 17 (January 10, 2020)
Preview 17 shipped the improved Perlin noise shader and moved ANGLE to vcpkg.
Preview 9 (December 10, 2019)
Preview 9 opened the 1.68.2 line and also formed the basis of 1.68.1.1 with the image-decoding and HarfBuzz string fixes.