Update to SkiaSharp v3#262
Conversation
Minimal changes to update dependencies and build the project.
For two cases, the results (to my eye and a visual PNG image diff tool) were indistinguishable, so here I adjust the threshold value for a passing test. For the other cases, the differences were more noticeable, so they need more work.
|
We don't need that to be updated as current version should be backwards compatible. |
Good point @wieslawsoltes. There are also several build warnings related to third-party dependencies such as Should we try to update these or make that a separate effort/PR? |
I will update them later as I plan to update deps and Nuke build system to newest version. |
|
Okay, great! I'll leave the PR as is then, and will use a build of my fork until new versions are available (I am blocked on a large MAUI upgrade due to different transitive SkiaSharp dependencies) |
|
Have you had a chance to look at this @wieslawsoltes? This is blocking updates to SkiaSharp v3 and it would be great to get that updated. |
|
I'm having issues as well with SkiaSharp v3. Could this be merged? |
|
According to the SkiaSharp repo the equivalent of SKFilterQuality.High is public static partial class SkiaExtensions |
|
@mlancione I will try to use this sampling option instead and see if more tests pass 👍 |
Which is the used by SkiaSharp for mapping from SKFilterQuality.High in v3.
|
@wieslawsoltes Any update on merging this PR? |
|
I have opened #291 as it requires bit more work in object model and other places. |
This pull request addresses #261 by upgrading the SkiaSharp dependency to v3.116.1.
The update var relatively straightforward, and the only breaking API was around the
SkiaSharp.SKImageFilter.CreatePaintmethod call. In SkiaSharp v3 theSKImageFilter.CreatePaintmethod is missing and replaced withSkiaSharp.SKImageFilter.CreateShaderas discussed here: mono/SkiaSharp#2569Also, the
SkiaSharp.SKImageFilter.CreateImagemethod does no longer take aSkiaSharp.SKFilterQualityargument, but instead aSKSamplingOptions.If I used
SKSamplingOptions.Defaultmany of the unit tests would break. From trial and error the followingSKSamplingOptionsoption gave most passing tests:I still had to adjust the threshold for two tests (where manually comparing the visual results was acceptable, but the test was still failing) and skip an additional three cases (for tests that already had some skipping cases).
So far, the PR has made minimal changes to build against SkiaSharp v3. There are several build warnings due to deprecated APIs in SkiaSharp v3 that should be addressed?
Opening the PR early to get feedback and ensure this work is not a waste of time, and if @wieslawsoltes would be accepting such contributions.
Closing #261 if merged.