Proposed changes to the internal API #13
Draft
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.
Hey,
this PR is solely meant to discuss the options we have.
I noticed that having many icons rendered at the same time (for exmple in the icon pack browser) I can see a performance drop. This can be reduced if the icons are renderd outside the UIThread, however Avalonia doesn't allow this.
the idea
SkiaSharp (which is almost always available in standard Avalonia-Apps) can render the path into a Bitmap in an async manner. This can be consumed by the Avalonia app then. But this would require an API to get the data as a Bitmap. See code changes of this PR.
Additional idea
We have to care about Flipping the data in several places which one needs to track "by hand". Can't we have an attribute or property on the icon pack to read and process the data? The flip itself can even happen inside the proposed API to read the raw path.