Skip to the shelves

SkiaSharp 4.0 Launches Stable Release with Enhanced Features and Performance

Date due card
Shelf AI & ML
Date in
Readers946

The stable release of SkiaSharp 4.148.0 introduces substantial improvements in graphics capabilities, performance, and a cleaner API for developers.

SkiaSharp 4.0 Launches Stable Release with Enhanced Features and Performance

SkiaSharp has established itself as a fundamental component for cross-platform 2D graphics within the .NET ecosystem for over a decade. Leveraging the capabilities of the open-source Skia engine, it facilitates pixel-perfect rendering of text, geometry, and images across mobile, desktop, web, and server environments. Widely adopted by .NET MAUI, WinUI 3, and frameworks like Uno Platform, SkiaSharp has reached a significant milestone today with its latest release.

SkiaSharp 4.148.0 is officially the first stable release of the SkiaSharp v4 line. Developers eagerly awaiting a stable version can now confidently upgrade and integrate this release into their projects.

For those interested, SkiaSharp 4.148.0 is available for download on NuGet, along with comprehensive details in the release notes and an interactive gallery on the updated SkiaSharp website.

Key Enhancements in SkiaSharp 4.148.0

A more robust engine at no cost. The release includes an upgraded version of the native Skia engine, aligned with milestone m148. This enhancement comes from extensive rendering, codec, performance, and security improvements made over the years, benefiting all applications without necessitating any code changes. Users can expect sharper downscaled images, automatic photo orientation adjustments, more precise color representation, and notable performance gains.

New capabilities to explore. This release introduces full control over OpenType variable font axes through integration with SkiaSharp and HarfBuzzSharp, along with features for color font palettes for emoji and icon fonts. Furthermore, the inclusion of animated WebP encoding via the SKWebpEncoder broadens the creative possibilities.

A refined and accurate API. SkiaSharp v4 finalizes the long-anticipated migration process with the retirement of legacy APIs, leading to a tidier interface. Key improvements include reworked object lifecycle management, which addresses use-after-free crashes by ensuring proper reference counting for native singletons. This fix is subtle yet essential, enhancing overall stability and performance.

Modernized development practices. Noteworthy changes extend to the underlying infrastructure; the testing suite has transitioned to xUnit v3, utilizing reproducible Docker images for builds. Device and WebAssembly testing are now streamlined with the aid of DeviceRunners, while bundled native dependencies have been updated to incorporate the latest security patches.

Example of SkiaSharp rendering variable fonts in action.

Rendering with SkiaSharp showcasing color fonts.

Both animations were produced using SkiaSharp 4.148.0 itself: variable-font axes and color-font palettes rendered as frames before being encoded to animated WebP. See the source here.

Performance Improvements

Performance is a critical factor for any graphics engine. Initial testing with the hardware-accelerated GPU backend indicates that SkiaSharp v4 can render demanding app UI elements, such as elevated cards and drop shadows, up to 24% faster than its predecessor. For instance, rendering a shadowed card dashboard showed an increase from 65 to 80 FPS, and a scrolling activity feed improved from 47 to 58 FPS.

Scenes that use minimal shadow effects—including charts, text, and vector maps—remain efficient, meaning users reap performance benefits without sacrificing quality. Additionally, enhancements to procedural Perlin-noise shaders yield a remarkable sixfold increase in CPU speed, a significant advantage for generative textures and effects.

These performance evaluations are based on initial testing conducted on Windows 11 and .NET 10 over OpenGL. Please note that absolute frame rates will vary depending on GPU and driver configurations.

Enhanced Development Workflow

The SkiaSharp project benefits from an extensive underlying C++ codebase maintained by Google. Recent improvements have shifted many previously manual tasks towards agentic workflows, which streamline the processes of syncing upstream Skia milestones, auditing for vulnerabilities, generating release notes, and maintaining documentation. This shift allows developers to focus more on API design and functionality, enhancing the project’s evolution alongside Chrome’s release cycle.

Future Directions and Ongoing Collaboration

SkiaSharp now emphasizes a stronger commitment to developing in step with upstream Skia milestones, addressing community feedback regarding the need for more predictable versioning. The partnership between the .NET team and Uno Platform has led to a more structured release cadence in two channels—Stable and Preview—mirroring Chrome’s release channels. This strategic alignment enables developers to plan their projects with enhanced confidence regarding the integration of SkiaSharp updates.

The next preview version, 4.150.0 Preview 2, is already available on NuGet, featuring updates like Graphite— a next-generation Skia GPU backend developed by Uno Platform—alongside new image and color filter APIs as well as SkSL image filters.

Appreciation for Uno Platform

The development of SkiaSharp 4 owes much to the collaborative effort between the .NET team and the Uno Platform. As both a user and contributor, Uno’s team has played a pivotal role in enhancing SkiaSharp via significant contributions, including engine upgrades, the complete implementation of variable font support, object lifecycle fixes, and cross-platform tooling for contributors. Such collaboration continues to strengthen both Uno’s applications and the SkiaSharp project.

Explore the interactive capabilities of SkiaSharp in the SkiaSharp gallery or test your own code at SkiaFiddle, powered by Uno Platform.

Join the SkiaSharp Live Event

In celebration of the release, a live event organized by the .NET Foundation and Uno Platform will delve deeper into the features and enhancements of SkiaSharp. Participants will have the opportunity to see live demonstrations and discussions that span the current advancements and future roadmap for the platform.

📅 Event Date: June 30, 11 AM to 3 PM ET

📺 Viewing Platforms: Available on Uno Platform's YouTube channel, X, LinkedIn, and the .NET Foundation's YouTube channel

🔗 Detailed Information: Visit platform.uno/skiasharp

Join us for an engaging event featuring demos and insightful discussions. We look forward to connecting with the community!

Conclusion

The SkiaSharp 4.148.0 stable release represents a crucial advancement, presenting users with a modernized engine, enhanced features such as variable fonts and animated WebP, a refined API, and a predictable release strategy. Developers can now explore these capabilities and engage with the SkiaSharp community for ongoing contributions and feedback. Check it out on NuGet and stay involved in the vibrant ecosystem.

Source: Matthew Leibowitz · devblogs.microsoft.com

Readers also borrowed