Microsoft.Maui.Graphics
Microsoft.Maui.Graphics copied to clipboard
[Windows] Fix DrawImage method
Fix DrawImage
method on Windows
We need this PR as a preliminary step to fix https://github.com/dotnet/Microsoft.Maui.Graphics/issues/250
This adds a significant performance and memory hit. The library should be able to re-use the underlying native image representations, especially when you need to do something like tile an image.
@hartez @jsuarezruiz This will need a more involved fix. The problem is that with Direct2D you have limitations about using resources between contexts. In some cases, the proposed solution would be acceptable but in most cases it's not acceptable from the aforementioned memory and performance issues.
I should have some time tomorrow to look at a permanent solution.