Skip to content
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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Update SkiaSharp #26373

wants to merge 10 commits into from

Conversation

mattleibow
Copy link
Member

@mattleibow mattleibow commented Dec 4, 2024

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.Skia NuGet API.

The change is the fact that in SkiaSharp v2.x, there was just a single SKPaint object that was used for paint/color/appearance AND font/text rendering. In the new SkiaSharp v3.x, this has been split into SKPaint and SKFont objects. Unfortunately, these types leaked out of a few MAUI types and thus changing it would force us to now expose a new SKFont argument 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

@mattleibow mattleibow requested a review from a team as a code owner December 4, 2024 19:50
@mattleibow
Copy link
Member Author

If the ABI breaks are acceptable, I can do it in this PR or in a separate one.

@Redth Redth requested a review from Copilot December 4, 2024 21:47

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;
@jfversluis jfversluis added the area-infrastructure CI, Maestro / Coherency, upstream dependencies/versions label Dec 9, 2024
@mattleibow mattleibow force-pushed the dev/update-skiasharp branch 4 times, most recently from 19bae90 to f780dcc Compare December 12, 2024 17:18
@mattleibow
Copy link
Member Author

I first want to merge tests in #26591 as we do not really have any skia graphics tests

@mattleibow mattleibow marked this pull request as draft December 17, 2024 19:54
@dartasen
Copy link
Contributor

dartasen commented Jan 7, 2025

Any news on this one 👀 ?

@mattleibow mattleibow force-pushed the dev/update-skiasharp branch from fa6255d to 1de39ce Compare January 7, 2025 21:12
@mattleibow mattleibow force-pushed the dev/update-skiasharp branch 2 times, most recently from 94bf9d9 to 0909368 Compare January 8, 2025 13:41
@mattleibow mattleibow force-pushed the dev/update-skiasharp branch from 0909368 to 8364ce2 Compare January 8, 2025 13:43
@mattleibow mattleibow added area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing and removed area-infrastructure CI, Maestro / Coherency, upstream dependencies/versions labels Jan 13, 2025
@mattleibow mattleibow self-assigned this Jan 13, 2025
@mattleibow mattleibow added this to the .NET 9 SR4 milestone Jan 13, 2025
@mattleibow mattleibow marked this pull request as ready for review January 13, 2025 15:08
@mattleibow mattleibow removed their assignment Jan 15, 2025
@PureWeen PureWeen modified the milestones: .NET 9 SR4, .NET 9 SR5 Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing
Projects
Status: Ready To Review
Development

Successfully merging this pull request may close these issues.

Update SkiaSharp in maui to the latest 3.x stable to get the security fixes
4 participants