-
Notifications
You must be signed in to change notification settings - Fork 549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add and remove the compatibility APIs #2789
Conversation
|
e4e721c
to
f091b79
Compare
67d6abc
to
a4c12fa
Compare
I am trying to add back magic here, but I am wondering if this is actually useful. For example, we added some overloads - but what about all the other things that are changed - like switching from array to a span? Are we just making things better for 1% of apps? |
@mattleibow testing on Avalonia, I didn't have any incompatibilities with span/array methods. Possibly because we didn't use these. The only issues I had were I would expect apps that heavily use SkiaSharp API would have to upgrade either way. |
c1de544
to
314cd53
Compare
Doing some more testing and I think this is working nicely. We have some new tolling that you can use to help detect things. Check out this issue description for more information: #2790 Add comments on that issue if there are any general upgrade issues or issues with the tools. |
Wow, didn't know about this tool. Quite useful. I will test 2.88.8-preview1 on Avalonia, thank you! |
@mattleibow for some reason, I see some false positives with this tool. That all the compat issues it found (comparing with the latest nuget preview): <member fullname="System.Void SkiaSharp.SKCanvas::SetMatrix(SkiaSharp.SKMatrix)" />
<member fullname="System.Void SkiaSharp.SKPath::Transform(SkiaSharp.SKMatrix)" />
<member fullname="SkiaSharp.SKPoint[] SkiaSharp.SKRoundRect::get_Radii()" />
<member fullname="System.Void SkiaSharp.SKMatrix::Concat(SkiaSharp.SKMatrix&,SkiaSharp.SKMatrix,SkiaSharp.SKMatrix)" />
<member fullname="System.Boolean SkiaSharp.SKPathMeasure::GetPosition(System.Single,SkiaSharp.SKPoint&)" />
<member fullname="System.Boolean SkiaSharp.SKPathMeasure::GetPositionAndTangent(System.Single,SkiaSharp.SKPoint&,SkiaSharp.SKPoint&)" />
<member fullname="System.Boolean SkiaSharp.SKRegion/RectIterator::Next(SkiaSharp.SKRectI&)" /> SetMatrix and Transform make sense, as these changes weren't yet pushed. But all other APIs: SKRoundRect::get_Radii, SKMatrix::Concat, SKPathMeasure::GetPosition, SKPathMeasure::GetPositionAndTangent, SKRegion/RectIterator::Next were not really changed, as I can see, right? |
Enabled render tests for SkiaSharp 3.0, some outputs are different, most likely we need to somehow use Will remove SKCanvas/SKPath hacks later as well, when this PR is shipped. |
@maxkatz6 thanks for letting me know. I had a bug in the tool that was not reporting ref/out params, but I fixed that and pushed an update to nuget.
Do you have some examples? There has been over a year of changes to skia, and before the sampling options the filter quality was whatever the implementation felt like. Now it is a bit more predictable. Not sure how one would handle cases where they did a pixel rounding adjustment or a slightly different algorithm for a path or something. Technically neither will be "wrong" just different based on your old baselines. If there are major differences, then maybe there is a bug in v2 or v3. |
@mattleibow created AvaloniaUI/Avalonia#15503 tracking issue, what I should have done earlier. |
I see we do store the filter quality on the paint, but I think it was like that for some time. Do you have an example of where it is not working properly? Maybe I am using some wrong api and not passing the quality from paint. |
Description of Change
In SkiaSharp 3.0 we are focusing on performance and making use of new APIs and structures.
However, we can add a few compatibility things back to make upgrades much simple/easier.