-
Notifications
You must be signed in to change notification settings - Fork 548
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dev/jela/winui-xamlroot
- Loading branch information
Showing
178 changed files
with
6,267 additions
and
4,113 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Find Similar Issues | ||
|
||
on: | ||
issues: | ||
types: [opened] | ||
issue_comment: | ||
types: [created] | ||
|
||
jobs: | ||
getSimilarIssues: | ||
runs-on: ubuntu-latest | ||
if: >- | ||
(github.event_name == 'issues' && github.event.action == 'opened') || | ||
(github.event_name == 'issue_comment' && github.event.action == 'created' && startsWith(github.event.comment.body, '/similarissues')) | ||
outputs: | ||
message: ${{ steps.getBody.outputs.message }} | ||
steps: | ||
- id: getBody | ||
uses: craigloewen-msft/GitGudSimilarIssues@main | ||
with: | ||
issueTitle: ${{ github.event.issue.title }} | ||
issueBody: ${{ github.event.issue.body }} | ||
repo: ${{ github.repository }} | ||
similaritytolerance: "0.70" | ||
add-comment: | ||
needs: getSimilarIssues | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
if: needs.getSimilarIssues.outputs.message != '' | ||
steps: | ||
- name: Add comment | ||
run: gh issue comment "$NUMBER" --repo "$REPO" --body "$BODY" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NUMBER: ${{ github.event.issue.number }} | ||
REPO: ${{ github.repository }} | ||
BODY: ${{ needs.getSimilarIssues.outputs.message }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<ItemGroup> | ||
<Content Include="$(MSBuildThisFileDirectory)..\output\native\winui\any\*.dll" Visible="False" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="$(TargetFramework.Contains('-windows')) and '$(Platform)' != 'AnyCPU' and '$(Platform)' != 'Any CPU'"> | ||
<Content Include="$(MSBuildThisFileDirectory)..\output\native\winui\$(Platform)\*" Visible="False" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="$(TargetFramework.Contains('-windows')) and ('$(Platform)' == 'AnyCPU' or '$(Platform)' == 'Any CPU')"> | ||
<Content Include="$(MSBuildThisFileDirectory)..\output\native\winui\x64\*" Condition="'$(RuntimeIdentifier)' == 'win10-x64'" Visible="False" /> | ||
<Content Include="$(MSBuildThisFileDirectory)..\output\native\winui\x86\*" Condition="'$(RuntimeIdentifier)' == 'win10-x86'" Visible="False" /> | ||
<Content Include="$(MSBuildThisFileDirectory)..\output\native\winui\arm64\*" Condition="'$(RuntimeIdentifier)' == 'win10-arm64'" Visible="False" /> | ||
<Content Include="$(MSBuildThisFileDirectory)..\output\native\winui\x64\*" Condition="'$(RuntimeIdentifier)' == ''" Visible="False" CopyToOutputDirectory="PreserveNewest" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
binding/SkiaSharp.NativeAssets.WinUI/SkiaSharp.NativeAssets.WinUI.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFrameworks>$(WindowsTargetFrameworks)</TargetFrameworks> | ||
<PackagingGroup>SkiaSharp</PackagingGroup> | ||
<Title>$(PackagingGroup) - Native Assets for Windows UI (WinUI 3)</Title> | ||
<IsWindowsNativeAssets>true</IsWindowsNativeAssets> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<NativeWindowsPackageFile Include="..\..\output\native\winui\any\*" RuntimeIdentifier="win-x64" Folder="lib\$(WindowsTargetFrameworksCurrent)" /> | ||
<NativeWindowsPackageFile Include="..\..\output\native\winui\x64\*" RuntimeIdentifier="win-x64" /> | ||
<NativeWindowsPackageFile Include="..\..\output\native\winui\any\*" RuntimeIdentifier="win-x86" Folder="lib\$(WindowsTargetFrameworksCurrent)" /> | ||
<NativeWindowsPackageFile Include="..\..\output\native\winui\x86\*" RuntimeIdentifier="win-x86" /> | ||
<NativeWindowsPackageFile Include="..\..\output\native\winui\any\*" RuntimeIdentifier="win-arm64" Folder="lib\$(WindowsTargetFrameworksCurrent)" /> | ||
<NativeWindowsPackageFile Include="..\..\output\native\winui\arm64\*" RuntimeIdentifier="win-arm64" /> | ||
</ItemGroup> | ||
</Project> |
36 changes: 36 additions & 0 deletions
36
binding/SkiaSharp.Resources/Properties/SkiaSharpResourcesAssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System; | ||
using System.Reflection; | ||
using System.Resources; | ||
using System.Runtime.CompilerServices; | ||
|
||
[assembly: AssemblyTitle("SkiaSharp.Resources")] | ||
[assembly: AssemblyDescription("This package adds lottie support to SkiaSharp via skottie.")] | ||
[assembly: AssemblyCompany("Microsoft Corporation")] | ||
[assembly: AssemblyProduct("SkiaSharp")] | ||
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")] | ||
[assembly: NeutralResourcesLanguage("en")] | ||
|
||
[assembly: InternalsVisibleTo("SkiaSharp.Tests, PublicKey=" + | ||
"002400000480000094000000060200000024000052534131000400000100010079159977d2d03a" + | ||
"8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c" + | ||
"3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fd" + | ||
"dafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef00" + | ||
"65d016df")] | ||
|
||
[assembly: InternalsVisibleTo("SkiaSharp.Benchmarks, PublicKey=" + | ||
"002400000480000094000000060200000024000052534131000400000100010079159977d2d03a" + | ||
"8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c" + | ||
"3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fd" + | ||
"dafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef00" + | ||
"65d016df")] | ||
|
||
[assembly: AssemblyMetadata("IsTrimmable", "True")] | ||
|
||
#if __IOS__ || __TVOS__ || __MACOS__ | ||
// This attribute allows you to mark your assemblies as “safe to link”. | ||
// When the attribute is present, the linker—if enabled—will process the assembly | ||
// even if you’re using the “Link SDK assemblies only” option, which is the default for device builds. | ||
#pragma warning disable CS0618 // Type or member is obsolete | ||
[assembly: Foundation.LinkerSafe] | ||
#pragma warning restore CS0618 // Type or member is obsolete | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
using System; | ||
|
||
namespace SkiaSharp.Resources | ||
{ | ||
public abstract unsafe class ResourceProvider : SKObject, ISKReferenceCounted, ISKSkipObjectRegistration | ||
{ | ||
internal ResourceProvider (IntPtr handle, bool owns) | ||
: base (handle, owns) | ||
{ | ||
} | ||
|
||
public SKData? Load (string resourceName) => | ||
Load ("", resourceName); | ||
|
||
public SKData? Load (string resourcePath, string resourceName) => | ||
SKData.GetObject (ResourcesApi.skresources_resource_provider_load (Handle, resourcePath, resourceName)); | ||
} | ||
|
||
public sealed class CachingResourceProvider : ResourceProvider | ||
{ | ||
public CachingResourceProvider (ResourceProvider resourceProvider) | ||
: base (Create (resourceProvider), true) | ||
{ | ||
Referenced(this, resourceProvider); | ||
} | ||
|
||
private static IntPtr Create (ResourceProvider resourceProvider) | ||
{ | ||
_ = resourceProvider ?? throw new ArgumentNullException (nameof (resourceProvider)); | ||
return ResourcesApi.skresources_caching_resource_provider_proxy_make (resourceProvider.Handle); | ||
} | ||
} | ||
|
||
public sealed class DataUriResourceProvider : ResourceProvider | ||
{ | ||
public DataUriResourceProvider (bool preDecode = false) | ||
: this (null, preDecode) | ||
{ | ||
} | ||
|
||
public DataUriResourceProvider (ResourceProvider? fallbackProvider, bool preDecode = false) | ||
: base (Create (fallbackProvider, preDecode), true) | ||
{ | ||
Referenced (this, fallbackProvider); | ||
} | ||
|
||
private static IntPtr Create (ResourceProvider? fallbackProvider, bool preDecode = false) => | ||
ResourcesApi.skresources_data_uri_resource_provider_proxy_make (fallbackProvider?.Handle ?? IntPtr.Zero, preDecode); | ||
} | ||
|
||
public sealed class FileResourceProvider : ResourceProvider | ||
{ | ||
public FileResourceProvider (string baseDirectory, bool preDecode = false) | ||
: base (Create (baseDirectory, preDecode), true) | ||
{ | ||
} | ||
|
||
private static IntPtr Create (string baseDirectory, bool preDecode) | ||
{ | ||
using var baseDir = new SKString(baseDirectory ?? throw new ArgumentNullException (nameof (baseDirectory))); | ||
return ResourcesApi.skresources_file_resource_provider_make (baseDir.Handle, preDecode); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#nullable disable | ||
|
||
using System; | ||
|
||
namespace SkiaSharp | ||
{ | ||
internal partial class ResourcesApi | ||
{ | ||
#if __IOS__ || __TVOS__ | ||
private const string SKIA = "@rpath/libSkiaSharp.framework/libSkiaSharp"; | ||
#else | ||
private const string SKIA = "libSkiaSharp"; | ||
#endif | ||
|
||
#if USE_DELEGATES | ||
private static readonly Lazy<IntPtr> libSkiaSharpHandle = | ||
new Lazy<IntPtr> (() => LibraryLoader.LoadLocalLibrary<SkiaApi> (SKIA)); | ||
|
||
private static T GetSymbol<T> (string name) where T : Delegate => | ||
LibraryLoader.GetSymbolDelegate<T> (libSkiaSharpHandle.Value, name); | ||
#endif | ||
} | ||
} |
Oops, something went wrong.