Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Use newer SkiaSharp APIs #216
Use newer SkiaSharp APIs #216
Changes from 4 commits
7545ec7
fb044e9
c710cd6
b4fb189
75a255e
75f8c9a
408c967
d38f622
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Right now the NuGet is just a preview, but once I manage to get all the other things ready and it lives for a few days and gets a few download I will push it stable.
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.
This shader filter is the new filter that is preferred over paint filter. According to Google: google/skia@7d0f853
The Paint filter right now may do extra things, but it appears that all the things can be done via merged filters. For example, a fill image/color can be a done with an Image/Color shader. I am not too familiar with how the image filters get created in Svg.Skia and all the potential caveats so I did not feel too comfortable switching just yet.
In 2.x, the Shader filter is really a paint filter with the shader set so should be identical to 3.x Shader. In 3.x, the Paint filter is really a lie and is just the Shader from the paint, so the behavior might be different. https://github.com/mono/SkiaSharp/pull/2789/files#diff-a167a40fc94fe828c0c2d37f6e69d29949af733c40bf8a8b632223a277b2f712R426
I may try be smarter and detect if you just have a Shader, then use a Shader filter, if you just have a Color or something then use that filter type. However, it may be better to just do it right in the caller so SkiaSharp does not do weird things.
If you have ideas on this, I can try and make the compat even more awesome.
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.
Not sure if I did this right... I don't think this code path will be hit currently as no current API actually uses shader image filters, but this is for when we do.