fix: Add WinUI native helper for GetByteBuffer
Description of Change
Backports changes from https://github.com/mono/SkiaSharp/pull/2920 to the 2x branch.
Bugs Fixed
- Fixes https://github.com/mono/SkiaSharp/issues/2999
API Changes
None.
Behavioral Changes
None.
Required skia PR
None.
PR Checklist
- [ ] Has tests (if omitted, state reason in description)
- [ ] Rebased on top of main at time of PR
- [ ] Merged related skia PRs
- [ ] Changes adhere to coding standard
- [ ] Updated documentation
/azp run
Commenter does not have sufficient privileges for PR 3039 in repo mono/SkiaSharp
Hi @mattleibow, @Redth! Could you update the azure devops branch triggers for PRs on the release/2x? Thanks!
/azp run
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.
/azp run
Commenter does not have sufficient privileges for PR 3039 in repo mono/SkiaSharp
/azp run
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.
/azp run
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.
/azp run
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.
/azp run
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.
/rebase
/azp run
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.
/azp run
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.
Some more of my changes to get CI: https://github.com/unoplatform/Uno.SkiaSharp/pull/33
Still not green yet, but closer i think?
/azp run
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.
Closer!
"D:\a\1\s\source\SkiaSharpSource.Windows-netfx.slnf" (Build target) (1:2) ->
"D:\a\1\s\source\SkiaSharp.Views.Forms\SkiaSharp.Views.Forms.UWP\SkiaSharp.Views.Forms.UWP.csproj" (default target) (2:6) ->
"D:\a\1\s\source\SkiaSharp.Views\SkiaSharp.Views.UWP\SkiaSharp.Views.UWP.csproj" (default target) (6:8) ->
(CoreCompile target) ->
D:\a\1\s\source\SkiaSharp.Views\SkiaSharp.Views.UWP\UWPExtensions.cs(6,23): error CS0234: The type or namespace name 'WinUI' does not exist in the namespace 'SkiaSharp.Views' (are you missing an assembly reference?) [D:\a\1\s\source\SkiaSharp.Views\SkiaSharp.Views.UWP\SkiaSharp.Views.UWP.csproj]
"D:\a\1\s\source\SkiaSharpSource.Windows-netfx.slnf" (Build target) (1:2) ->
"D:\a\1\s\source\SkiaSharp.Views.WinUI\SkiaSharp.Views.WinUI\SkiaSharp.Views.WinUI.csproj" (default target) (22:14) ->
"D:\a\1\s\source\SkiaSharp.Views.WinUI\SkiaSharp.Views.WinUI\SkiaSharp.Views.WinUI.csproj" (Build target) (22:16) ->
D:\a\1\s\source\SkiaSharp.Views\SkiaSharp.Views.UWP\UWPExtensions.cs(177,23): error CS0121: The call is ambiguous between the following methods or properties: 'Utils.GetByteBuffer(IBuffer)' and 'WindowsExtensions.GetByteBuffer(IBuffer)' [D:\a\1\s\source\SkiaSharp.Views.WinUI\SkiaSharp.Views.WinUI\SkiaSharp.Views.WinUI.csproj::TargetFramework=net6.0-windows10.0.19041.0]
"D:\a\1\s\source\SkiaSharpSource.Windows-netfx.slnf" (Build target) (1:2) ->
"D:\a\1\s\source\SkiaSharp.Views.WinUI\SkiaSharp.Views.WinUI\SkiaSharp.Views.WinUI.csproj" (default target) (22:14) ->
"D:\a\1\s\source\SkiaSharp.Views.WinUI\SkiaSharp.Views.WinUI\SkiaSharp.Views.WinUI.csproj" (Build target) (22:15) ->
D:\a\1\s\source\SkiaSharp.Views\SkiaSharp.Views.UWP\UWPExtensions.cs(177,23): error CS0121: The call is ambiguous between the following methods or properties: 'Utils.GetByteBuffer(IBuffer)' and 'WindowsExtensions.GetByteBuffer(IBuffer)' [D:\a\1\s\source\SkiaSharp.Views.WinUI\SkiaSharp.Views.WinUI\SkiaSharp.Views.WinUI.csproj::TargetFramework=net6.0-windows10.0.18362.0]
building now and will see https://github.com/unoplatform/Uno.SkiaSharp/pull/35
/azp run
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.
Successfully created package 'D:\a\1\s\output\nugets\SkiaSharp.NativeAssets.Win32.2.88.9-preview.0.1.symbols.nupkg'.
Attempting to build package from 'SkiaSharp.NativeAssets.WinUI.temp.nuspec'.
Target path 'runtimes\win-x64\native\*.dll' contains invalid characters.
Target path 'runtimes\win-x64\native\*.winmd' contains invalid characters.
Target path 'runtimes\win-x86\native\*.dll' contains invalid characters.
Target path 'runtimes\win-x86\native\*.winmd' contains invalid characters.
Target path 'runtimes\win-arm64\native\*.dll' contains invalid characters.
Target path 'runtimes\win-arm64\native\*.winmd' contains invalid characters.
The nuspec I think cannot handle wildcards. I do a bunch of things to manipulate it and I think that is not too fancy.
Indeed, I used it incorrectly, it should be the source path, not the target