Skip to content

Commit eed06a8

Browse files
committed
Merge remote-tracking branch 'origin/release/2.x' into release/2.88.9-preview.2
2 parents 7362639 + 94a2734 commit eed06a8

37 files changed

+702
-118
lines changed

Diff for: VERSIONS.txt

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ SkiaSharp.NativeAssets.tvOS nuget 2.88.9
6868
SkiaSharp.NativeAssets.UWP nuget 2.88.9
6969
SkiaSharp.NativeAssets.watchOS nuget 2.88.9
7070
SkiaSharp.NativeAssets.Win32 nuget 2.88.9
71+
SkiaSharp.NativeAssets.WinUI nuget 2.88.9
7172
SkiaSharp.Views nuget 2.88.9
7273
SkiaSharp.Views.NativeAssets.UWP nuget 2.88.9
7374
SkiaSharp.Views.Desktop.Common nuget 2.88.9

Diff for: binding/IncludeNativeAssets.SkiaSharp.WinUI.targets

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Content Include="$(MSBuildThisFileDirectory)..\output\native\winui\any\*.dll" Visible="False" />
5+
</ItemGroup>
6+
7+
<ItemGroup Condition="$(TargetFramework.Contains('-windows')) and '$(Platform)' != 'AnyCPU' and '$(Platform)' != 'Any CPU'">
8+
<Content Include="$(MSBuildThisFileDirectory)..\output\native\winui\$(Platform)\*" Visible="False" />
9+
</ItemGroup>
10+
<ItemGroup Condition="$(TargetFramework.Contains('-windows')) and ('$(Platform)' == 'AnyCPU' or '$(Platform)' == 'Any CPU')">
11+
<Content Include="$(MSBuildThisFileDirectory)..\output\native\winui\x64\*" Condition="'$(RuntimeIdentifier)' == 'win10-x64'" Visible="False" />
12+
<Content Include="$(MSBuildThisFileDirectory)..\output\native\winui\x86\*" Condition="'$(RuntimeIdentifier)' == 'win10-x86'" Visible="False" />
13+
<Content Include="$(MSBuildThisFileDirectory)..\output\native\winui\arm64\*" Condition="'$(RuntimeIdentifier)' == 'win10-arm64'" Visible="False" />
14+
<Content Include="$(MSBuildThisFileDirectory)..\output\native\winui\x64\*" Condition="'$(RuntimeIdentifier)' == ''" Visible="False" CopyToOutputDirectory="PreserveNewest" />
15+
</ItemGroup>
16+
</Project>

Diff for: binding/SkiaSharp/SkiaSharp.csproj

+7
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@
1717
<None Include="..\..\output\native\windows\arm64\libSkiaSharp*" Link="nuget\runtimes\win-arm64\native\%(Filename)%(Extension)" />
1818
<!-- Windows: Nano Server -->
1919
<None Include="..\..\output\native\nanoserver\x64\libSkiaSharp*" Link="nuget\runtimes\nanoserver-x64\native\%(Filename)%(Extension)" />
20+
<!-- Windows: WinUI -->
21+
<None Include="..\..\output\native\winui\x86\SkiaSharp.Views.WinUI.Native*" Link="nuget\runtimes\winui-x86\native\%(Filename)%(Extension)" />
22+
<None Include="..\..\output\native\winui\any\SkiaSharp.Views.WinUI.Native.Projection*" Link="nuget\runtimes\winui-x86\lib\net6.0-windows10.0.19041\%(Filename)%(Extension)" />
23+
<None Include="..\..\output\native\winui\x64\SkiaSharp.Views.WinUI.Native*" Link="nuget\runtimes\winui-x64\native\%(Filename)%(Extension)" />
24+
<None Include="..\..\output\native\winui\any\SkiaSharp.Views.WinUI.Native.Projection*" Link="nuget\runtimes\winui-x64\lib\net6.0-windows10.0.19041\%(Filename)%(Extension)" />
25+
<None Include="..\..\output\native\winui\arm64\SkiaSharp.Views.WinUI.Native*" Link="nuget\runtimes\winui-arm64\native\%(Filename)%(Extension)" />
26+
<None Include="..\..\output\native\winui\any\SkiaSharp.Views.WinUI.Native.Projection*" Link="nuget\runtimes\winui-arm64\lib\net6.0-windows10.0.19041\%(Filename)%(Extension)" />
2027
<!-- Linux -->
2128
<None Include="..\..\output\native\linux\x64\libSkiaSharp*" Link="nuget\runtimes\linux-x64\native\%(Filename)%(Extension)" />
2229
<None Include="..\..\output\native\linux\x86\libSkiaSharp*" Link="nuget\runtimes\linux-x86\native\%(Filename)%(Extension)" />

Diff for: build.cake

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ var TRACKED_NUGETS = new Dictionary<string, Version> {
8080
{ "SkiaSharp.NativeAssets.UWP", new Version (1, 60, 0) },
8181
{ "SkiaSharp.NativeAssets.watchOS", new Version (1, 60, 0) },
8282
{ "SkiaSharp.NativeAssets.Win32", new Version (1, 60, 0) },
83+
{ "SkiaSharp.NativeAssets.WinUI", new Version (1, 60, 0) },
8384
{ "SkiaSharp.Views", new Version (1, 60, 0) },
8485
{ "SkiaSharp.Views.NativeAssets.UWP", new Version (1, 60, 0) },
8586
{ "SkiaSharp.Views.Desktop.Common", new Version (1, 60, 0) },

Diff for: externals/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
angle/
22
package_cache/
33
vcpkg/
4+
winappsdk/

Diff for: native/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
xcuserdata/
22
project.xcworkspace/
33
uwp/ANGLE/triplets
4+
Generated Files/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project>
2+
3+
<Import Project="$(MSBuildThisFileDirectory)..\..\..\..\source\SkiaSharp.Build.props" />
4+
5+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project>
2+
3+
<Import Project="$(MSBuildThisFileDirectory)..\..\..\..\source\SkiaSharp.Build.targets" />
4+
5+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFrameworks>$(WindowsTargetFrameworks)</TargetFrameworks>
5+
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
6+
<PackageId>SkiaSharp.Views.WinUI</PackageId>
7+
<PackagingGroup>SkiaSharp.Views.WinUI</PackagingGroup>
8+
<IsPackable>false</IsPackable>
9+
<ImplicitUsings>enable</ImplicitUsings>
10+
<Nullable>enable</Nullable>
11+
</PropertyGroup>
12+
13+
<PropertyGroup>
14+
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
15+
<CsWinRTIncludes>SkiaSharp.Views.WinUI.Native</CsWinRTIncludes>
16+
</PropertyGroup>
17+
18+
<ItemGroup>
19+
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.4" />
20+
</ItemGroup>
21+
22+
<ItemGroup>
23+
<ProjectReference Include="..\SkiaSharp.Views.WinUI.Native\SkiaSharp.Views.WinUI.Native.vcxproj" />
24+
</ItemGroup>
25+
26+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.9.34310.174
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SkiaSharp.Views.WinUI.Native", "SkiaSharp.Views.WinUI.Native\SkiaSharp.Views.WinUI.Native.vcxproj", "{730AF4C9-82D2-4FA7-AA32-154F3524EBD2}"
7+
EndProject
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkiaSharp.Views.WinUI.Native.Projection", "SkiaSharp.Views.WinUI.Native.Projection\SkiaSharp.Views.WinUI.Native.Projection.csproj", "{95E9FEB4-DCD3-4514-8208-A87688788BB2}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|Any CPU = Debug|Any CPU
13+
Debug|ARM64 = Debug|ARM64
14+
Debug|x64 = Debug|x64
15+
Debug|x86 = Debug|x86
16+
Release|Any CPU = Release|Any CPU
17+
Release|ARM64 = Release|ARM64
18+
Release|x64 = Release|x64
19+
Release|x86 = Release|x86
20+
EndGlobalSection
21+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
22+
{730AF4C9-82D2-4FA7-AA32-154F3524EBD2}.Debug|Any CPU.ActiveCfg = Debug|x64
23+
{730AF4C9-82D2-4FA7-AA32-154F3524EBD2}.Debug|Any CPU.Build.0 = Debug|x64
24+
{730AF4C9-82D2-4FA7-AA32-154F3524EBD2}.Debug|ARM64.ActiveCfg = Debug|ARM64
25+
{730AF4C9-82D2-4FA7-AA32-154F3524EBD2}.Debug|ARM64.Build.0 = Debug|ARM64
26+
{730AF4C9-82D2-4FA7-AA32-154F3524EBD2}.Debug|x64.ActiveCfg = Debug|x64
27+
{730AF4C9-82D2-4FA7-AA32-154F3524EBD2}.Debug|x64.Build.0 = Debug|x64
28+
{730AF4C9-82D2-4FA7-AA32-154F3524EBD2}.Debug|x86.ActiveCfg = Debug|Win32
29+
{730AF4C9-82D2-4FA7-AA32-154F3524EBD2}.Debug|x86.Build.0 = Debug|Win32
30+
{730AF4C9-82D2-4FA7-AA32-154F3524EBD2}.Release|Any CPU.ActiveCfg = Release|x64
31+
{730AF4C9-82D2-4FA7-AA32-154F3524EBD2}.Release|Any CPU.Build.0 = Release|x64
32+
{730AF4C9-82D2-4FA7-AA32-154F3524EBD2}.Release|ARM64.ActiveCfg = Release|ARM64
33+
{730AF4C9-82D2-4FA7-AA32-154F3524EBD2}.Release|ARM64.Build.0 = Release|ARM64
34+
{730AF4C9-82D2-4FA7-AA32-154F3524EBD2}.Release|x64.ActiveCfg = Release|x64
35+
{730AF4C9-82D2-4FA7-AA32-154F3524EBD2}.Release|x64.Build.0 = Release|x64
36+
{730AF4C9-82D2-4FA7-AA32-154F3524EBD2}.Release|x86.ActiveCfg = Release|Win32
37+
{730AF4C9-82D2-4FA7-AA32-154F3524EBD2}.Release|x86.Build.0 = Release|Win32
38+
{95E9FEB4-DCD3-4514-8208-A87688788BB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39+
{95E9FEB4-DCD3-4514-8208-A87688788BB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
40+
{95E9FEB4-DCD3-4514-8208-A87688788BB2}.Debug|ARM64.ActiveCfg = Debug|Any CPU
41+
{95E9FEB4-DCD3-4514-8208-A87688788BB2}.Debug|ARM64.Build.0 = Debug|Any CPU
42+
{95E9FEB4-DCD3-4514-8208-A87688788BB2}.Debug|x64.ActiveCfg = Debug|Any CPU
43+
{95E9FEB4-DCD3-4514-8208-A87688788BB2}.Debug|x64.Build.0 = Debug|Any CPU
44+
{95E9FEB4-DCD3-4514-8208-A87688788BB2}.Debug|x86.ActiveCfg = Debug|Any CPU
45+
{95E9FEB4-DCD3-4514-8208-A87688788BB2}.Debug|x86.Build.0 = Debug|Any CPU
46+
{95E9FEB4-DCD3-4514-8208-A87688788BB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
47+
{95E9FEB4-DCD3-4514-8208-A87688788BB2}.Release|Any CPU.Build.0 = Release|Any CPU
48+
{95E9FEB4-DCD3-4514-8208-A87688788BB2}.Release|ARM64.ActiveCfg = Release|Any CPU
49+
{95E9FEB4-DCD3-4514-8208-A87688788BB2}.Release|ARM64.Build.0 = Release|Any CPU
50+
{95E9FEB4-DCD3-4514-8208-A87688788BB2}.Release|x64.ActiveCfg = Release|Any CPU
51+
{95E9FEB4-DCD3-4514-8208-A87688788BB2}.Release|x64.Build.0 = Release|Any CPU
52+
{95E9FEB4-DCD3-4514-8208-A87688788BB2}.Release|x86.ActiveCfg = Release|Any CPU
53+
{95E9FEB4-DCD3-4514-8208-A87688788BB2}.Release|x86.Build.0 = Release|Any CPU
54+
EndGlobalSection
55+
GlobalSection(SolutionProperties) = preSolution
56+
HideSolutionNode = FALSE
57+
EndGlobalSection
58+
GlobalSection(ExtensibilityGlobals) = postSolution
59+
SolutionGuid = {FB8DA12F-84B5-4D7F-A6E1-7F0A53AA4535}
60+
EndGlobalSection
61+
EndGlobal
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include "pch.h"
2+
#include "BufferExtensions.h"
3+
#include "BufferExtensions.g.cpp"
4+
5+
using namespace winrt::Windows::Storage::Streams;
6+
7+
namespace winrt::SkiaSharp::Views::WinUI::Native::implementation
8+
{
9+
intptr_t BufferExtensions::GetByteBuffer(IBuffer const& buffer)
10+
{
11+
byte* current_data = nullptr;
12+
auto bufferByteAccess = buffer.as<winrt::impl::IBufferByteAccess>();
13+
bufferByteAccess->Buffer(&current_data);
14+
return (intptr_t)current_data;
15+
}
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#pragma once
2+
3+
#include "BufferExtensions.g.h"
4+
5+
using namespace winrt::Windows::Storage::Streams;
6+
7+
namespace winrt::SkiaSharp::Views::WinUI::Native::implementation
8+
{
9+
struct BufferExtensions
10+
{
11+
BufferExtensions() = default;
12+
13+
static intptr_t GetByteBuffer(IBuffer const& buffer);
14+
};
15+
}
16+
17+
namespace winrt::SkiaSharp::Views::WinUI::Native::factory_implementation
18+
{
19+
struct BufferExtensions : BufferExtensionsT<BufferExtensions, implementation::BufferExtensions>
20+
{
21+
};
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace SkiaSharp.Views.WinUI.Native
2+
{
3+
static runtimeclass BufferExtensions
4+
{
5+
static Int64 GetByteBuffer(Windows.Storage.Streams.IBuffer buffer);
6+
}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include "pch.h"
2+
#include "PropertySetExtensions.h"
3+
#include "PropertySetExtensions.g.cpp"
4+
5+
using namespace winrt::Windows::Foundation;
6+
using namespace winrt::Windows::Foundation::Collections;
7+
8+
namespace winrt::SkiaSharp::Views::WinUI::Native::implementation
9+
{
10+
void PropertySetExtensions::AddSingle(PropertySet const& propertySet, hstring const& key, float value)
11+
{
12+
propertySet.Insert(key, PropertyValue::CreateSingle(value));
13+
}
14+
15+
void PropertySetExtensions::AddSize(PropertySet const& propertySet, hstring const& key, Size const& height)
16+
{
17+
propertySet.Insert(key, PropertyValue::CreateSize(height));
18+
}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#pragma once
2+
3+
#include "PropertySetExtensions.g.h"
4+
5+
using namespace winrt::Windows::Foundation;
6+
using namespace winrt::Windows::Foundation::Collections;
7+
8+
namespace winrt::SkiaSharp::Views::WinUI::Native::implementation
9+
{
10+
struct PropertySetExtensions
11+
{
12+
PropertySetExtensions() = default;
13+
14+
static void AddSingle(PropertySet const& propertySet, hstring const& key, float value);
15+
static void AddSize(PropertySet const& propertySet, hstring const& key, Size const& value);
16+
};
17+
}
18+
19+
namespace winrt::SkiaSharp::Views::WinUI::Native::factory_implementation
20+
{
21+
struct PropertySetExtensions : PropertySetExtensionsT<PropertySetExtensions, implementation::PropertySetExtensions>
22+
{
23+
};
24+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace SkiaSharp.Views.WinUI.Native
2+
{
3+
static runtimeclass PropertySetExtensions
4+
{
5+
static void AddSingle(Windows.Foundation.Collections.PropertySet propertySet, String key, Single value);
6+
static void AddSize(Windows.Foundation.Collections.PropertySet propertySet, String key, Windows.Foundation.Size value);
7+
}
8+
}

0 commit comments

Comments
 (0)