The workaround needed for WASM is not really Blazor specific
and if the project is not using the Blazor views, the fix will not
be applied to the build.
* Do not stretch the background
When resizing a view, the background will be stretched making the image distorted and not a great experience.
This PR make sure to never scale the background brush and rather keep it top-left aligned.
* Update SKXamlCanvas.cs
* Scale the brush instead of stretching it
* fix: XamlRoot may be null when the SKXamlCanvas is unloaded
* chore: Adjust more xamlroot uses
---------
Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
Adds the GPU views for WinUI, but there are a few othe things it need
to do:
- Builds ANGLE as this is the primary interop between SkiaSharp and
DirectX
- Builds an interop library that extends types needed for interacting
with ANGLE
- Enables AngleSwapChainPanel as this is the WinUI view that sets up
the GL context
- Enables the SKSwapChainPanel as this is the SkiaSharp accelerated
view
- Add a new NativeAssets package for WinUI native files
The async void will terminate here. And we can ignore the Dispatcher.RunAsync result and we can receive the exception from TaskScheduler.UnobservedTaskException.
See https://github.com/dotnet/runtime/issues/76367
* Remove all [Obsolete] APIs from the bindings
* Remove all [Obsolete] APIs from the source
* Fix up the tests after removing things
* Fix up the samples
* Merge and modernize the binding projects
* Remove UWP and watchOS
* Add the native assets projects
* Rename bootstrapper.ps1 to build.ps1
* Add new device tests
* Rework the test skipping feature
---------
Co-authored-by: Jerome Laban <jerome.laban@nventive.com>
* ci: Adjust .NET 7 task name
* feat: Move to JSImport for WinUI Target on net7.0
* ci: Remove Uno Gallery WinUI sample testing on linux
Until dotnet build can be used. The sample is still built under windows.
* ci: Build uno.winui gallery
* ci: Adjust gallery net6-ios build
* chore: Add Uno SKSwapChainPanel stub for mac catalyst
* ci: remove winui test for net7
Needed until uno.ui can be updated to 4.6 or later, as the uno-runtime folder now supports the net7.0 structure, and is incompatible with uno 4.5 or earlier.
* ci: restore linux sample test
* ci: Adjust targets inclusion for uno winui
* ci: Add macOS testing for netcore targets
* chore: remove uno build from linux netfx, add netcore linux specific filter
* ci: remove netcore incompatible filters from library build
* ci: Remove linux test for uno.winui sample app
To obtain the expected built bitmap by skia, we need to change the SKAlphaType of the build image.
Opaque doesn't give correct results when bluring none opaque colors for example.
Premul doesn't work either for a particular reason:
In javascript we use the ImageData API.
The ImageData API store the pixels as un-premultiplied.
So if we use the premultiplied enum value we end up with wrong pixel colors (same result as Opaque in fact).
I tested unpremul value in a project that is using blur, and it gives the correct results.
Co-authored-by: Matthew Leibowitz <mattleibow@live.com>