SkiaSharp icon indicating copy to clipboard operation
SkiaSharp copied to clipboard

fix: Add WinUI native helper for GetByteBuffer

Open jeromelaban opened this issue 1 year ago • 24 comments

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

jeromelaban avatar Oct 15 '24 21:10 jeromelaban

/azp run

jeromelaban avatar Oct 15 '24 21:10 jeromelaban

Commenter does not have sufficient privileges for PR 3039 in repo mono/SkiaSharp

azure-pipelines[bot] avatar Oct 15 '24 21:10 azure-pipelines[bot]

Hi @mattleibow, @Redth! Could you update the azure devops branch triggers for PRs on the release/2x? Thanks!

jeromelaban avatar Oct 15 '24 21:10 jeromelaban

/azp run

mattleibow avatar Oct 16 '24 17:10 mattleibow

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

azure-pipelines[bot] avatar Oct 16 '24 17:10 azure-pipelines[bot]

/azp run

jeromelaban avatar Oct 17 '24 14:10 jeromelaban

Commenter does not have sufficient privileges for PR 3039 in repo mono/SkiaSharp

azure-pipelines[bot] avatar Oct 17 '24 14:10 azure-pipelines[bot]

/azp run

mattleibow avatar Oct 17 '24 15:10 mattleibow

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

azure-pipelines[bot] avatar Oct 17 '24 15:10 azure-pipelines[bot]

/azp run

mattleibow avatar Oct 18 '24 00:10 mattleibow

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

azure-pipelines[bot] avatar Oct 18 '24 00:10 azure-pipelines[bot]

/azp run

mattleibow avatar Oct 18 '24 01:10 mattleibow

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

azure-pipelines[bot] avatar Oct 18 '24 01:10 azure-pipelines[bot]

/azp run

mattleibow avatar Oct 18 '24 01:10 mattleibow

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

azure-pipelines[bot] avatar Oct 18 '24 01:10 azure-pipelines[bot]

/rebase

mattleibow avatar Oct 19 '24 05:10 mattleibow

/azp run

mattleibow avatar Oct 19 '24 16:10 mattleibow

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

azure-pipelines[bot] avatar Oct 19 '24 16:10 azure-pipelines[bot]

/azp run

mattleibow avatar Oct 20 '24 05:10 mattleibow

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

azure-pipelines[bot] avatar Oct 20 '24 05:10 azure-pipelines[bot]

Some more of my changes to get CI: https://github.com/unoplatform/Uno.SkiaSharp/pull/33

Still not green yet, but closer i think?

mattleibow avatar Oct 20 '24 10:10 mattleibow

/azp run

mattleibow avatar Oct 21 '24 09:10 mattleibow

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

azure-pipelines[bot] avatar Oct 21 '24 09:10 azure-pipelines[bot]

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]

mattleibow avatar Oct 21 '24 09:10 mattleibow

building now and will see https://github.com/unoplatform/Uno.SkiaSharp/pull/35

mattleibow avatar Oct 21 '24 12:10 mattleibow

/azp run

mattleibow avatar Oct 21 '24 13:10 mattleibow

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

azure-pipelines[bot] avatar Oct 21 '24 13:10 azure-pipelines[bot]

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.

mattleibow avatar Oct 21 '24 13:10 mattleibow

The nuspec I think cannot handle wildcards. I do a bunch of things to manipulate it and I think that is not too fancy.

mattleibow avatar Oct 21 '24 13:10 mattleibow

Indeed, I used it incorrectly, it should be the source path, not the target

jeromelaban avatar Oct 21 '24 13:10 jeromelaban