-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Update SkiaSharp #26373
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
Update SkiaSharp #26373
Conversation
|
If the ABI breaks are acceptable, I can do it in this PR or in a separate one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 12 changed files in this pull request and generated no suggestions.
Files not reviewed (7)
- eng/Versions.props: Language not supported
- src/Graphics/samples/GraphicsTester.Skia.Gtk/GraphicsTester.Skia.Gtk.csproj: Language not supported
- src/Graphics/src/Graphics.Skia/SKPaintExtensions.cs: Evaluated as low risk
- src/Graphics/src/Graphics.Skia/SkiaCanvas.cs: Evaluated as low risk
- src/Graphics/src/Graphics.Skia/SkiaTextLayout.cs: Evaluated as low risk
- src/SingleProject/Resizetizer/src/SkiaSharpSvgTools.cs: Evaluated as low risk
- src/Graphics/src/Graphics.Skia/SkiaCanvasState.cs: Evaluated as low risk
Comments skipped due to low confidence (1)
src/SingleProject/Resizetizer/src/SkiaSharpRasterTools.cs:9
- [nitpick] The variable name 'img' could be more descriptive. Consider renaming it to 'skiaImage'.
SKImage img;
19bae90 to
f780dcc
Compare
|
I first want to merge tests in #26591 as we do not really have any skia graphics tests |
f780dcc to
8212546
Compare
|
Any news on this one 👀 ? |
fa6255d to
1de39ce
Compare
94bf9d9 to
0909368
Compare
0909368 to
8364ce2
Compare
|
@mattleibow is it concerning at all that the border on the regenerated images is different? |
|
The red to green border? That is the github added and removed preview border. The images have no border. Unless you see another border being added/removed in the actual image? |
aw yea, derp Just validating a bit what changed here and what (if anything) we should alert people with regards to breaking changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mattleibow What are the images differences? Seems to be the same, same resolution, etc.
| } | ||
|
|
||
|
|
||
| public SKFont FontFont |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some additional possible suggestions?
TextAttributes
SKFont
FontConfiguration
FontAttributes
FontDetails
FontProperties
FontInfo
PureWeen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Update SkiaSharp package versions * Update GTK to match the new versions * Use the new SkiaSharp APIs in resizetizer * Regenerate resizetizer test images * Improve test assertions * Color ToString is invariant * Update Graphics.Skia with new SkiaSharp APIs * Regenerate graphics images * Force all images to be regenerated on CI * Fix stack overflow by setting the typeface
* Update SkiaSharp package versions * Update GTK to match the new versions * Use the new SkiaSharp APIs in resizetizer * Regenerate resizetizer test images * Improve test assertions * Color ToString is invariant * Update Graphics.Skia with new SkiaSharp APIs * Regenerate graphics images * Force all images to be regenerated on CI * Fix stack overflow by setting the typeface


Description of Change
This PR updates SkiaSharp to the latest stable version.
The code is mostly the same, however there are some obsolete things that we may have to use for now as doing it correctly will have breaking changes in the
Microsoft.Maui.Graphics.SkiaNuGet API.The change is the fact that in SkiaSharp v2.x, there was just a single
SKPaintobject that was used for paint/color/appearance AND font/text rendering. In the new SkiaSharp v3.x, this has been split intoSKPaintandSKFontobjects. Unfortunately, these types leaked out of a few MAUI types and thus changing it would force us to now expose a newSKFontargument in methods and return types of properties/methods.This may be acceptable though since these types are semi-implementation details and typically are not used directly, but are used via the abstract types.
Fixes #26099