Skip to content

Commit bc5020b

Browse files
Modernize the repository and prepare SkiaSharp 3.0 (#2505)
* 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 <[email protected]>
1 parent 0d384ab commit bc5020b

File tree

1,608 files changed

+83319
-71680
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,608 files changed

+83319
-71680
lines changed

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ assignees: ''
3535
- macOS: <!-- The version of macOS you are building for, e.g. 10.10 -->
3636
- Tizen: <!-- the version of the Tizen SDK you are compiling against, e.g. 4.0 -->
3737
- tvOS: <!-- the version of the tvOS SDK you are compiling against, e.g. 11.1 -->
38-
- UWP: <!-- the version of the UWP SDK you are compiling against, e.g. 16299 -->
39-
- watchOS: <!-- the version of the watchOS SDK you are compiling against, e.g. 11.1 -->
4038
- Windows Classic: <!-- the version of Windows you are building for, e.g. Windows 7 -->
4139
- Target Devices: <!-- the devices that you noticed this on, e.g. iPhone X -->
4240
- <!-- Google Pixel 4 XL -->

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ tools/
1313
**/Resources/Resource.designer.cs
1414
*.binlog
1515
**/BenchmarkDotNet.Artifacts/
16+
source/SkiaSharp.Build.Override.props
17+
source/SkiaSharp.Build.Override.targets
1618

1719
# User-specific files
1820
*.suo

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
[![HarfBuzzSharp](https://img.shields.io/nuget/vpre/HarfBuzzSharp.svg?cacheSeconds=3600&label=HarfBuzzSharp%20nuget)](https://www.nuget.org/packages/HarfBuzzSharp)
55

66
[![SkiaSharp.Views](https://img.shields.io/nuget/vpre/SkiaSharp.Views.svg?cacheSeconds=3600&label=SkiaSharp.Views%20nuget)](https://www.nuget.org/packages/SkiaSharp.Views)
7-
[![SkiaSharp.Views.Forms](https://img.shields.io/nuget/vpre/SkiaSharp.Views.Forms.svg?cacheSeconds=3600&label=SkiaSharp.Views.Forms%20nuget)](https://www.nuget.org/packages/SkiaSharp.Views.Forms)
87
[![SkiaSharp.Views.Maui.Controls](https://img.shields.io/nuget/vpre/SkiaSharp.Views.Maui.Controls.svg?cacheSeconds=3600&label=SkiaSharp.Views.Maui.Controls%20nuget)](https://www.nuget.org/packages/SkiaSharp.Views.Maui.Controls)
98
[![SkiaSharp.Views.Uno](https://img.shields.io/nuget/vpre/SkiaSharp.Views.Uno.svg?cacheSeconds=3600&label=SkiaSharp.Views.Uno%20nuget)](https://www.nuget.org/packages/SkiaSharp.Views.Uno)
109

@@ -29,14 +28,12 @@ SkiaSharp provides cross-platform bindings for:
2928
- Android
3029
- iOS
3130
- tvOS
32-
- watchOS
3331
- macOS
3432
- Mac Catalyst
3533
- WinUI 3 (Windows App SDK / Uno Platform)
3634
- Windows Classic Desktop (Windows.Forms / WPF)
37-
- Windows UWP (Desktop / Mobile / Xbox / HoloLens)
3835
- Web Assembly (WASM)
39-
- Uno Platform (iOS / macOS / Android / WebAssembly / UWP)
36+
- Uno Platform (iOS / macOS / Android / WebAssembly)
4037

4138
The [API Documentation](https://docs.microsoft.com/en-us/dotnet/api/SkiaSharp/) is
4239
available on the web to browse.

VERSIONS.txt

Lines changed: 0 additions & 104 deletions
This file was deleted.

benchmarks/SkiaSharp.Benchmarks/SkiaSharp.Benchmarks.sln renamed to benchmarks/SkiaSharp.Benchmarks.sln

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.3.32611.2
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkiaSharp", "..\..\binding\SkiaSharp\SkiaSharp.csproj", "{3E1B158B-6C3B-4340-9F01-28E77D24F31D}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkiaSharp", "..\binding\SkiaSharp\SkiaSharp.csproj", "{3E1B158B-6C3B-4340-9F01-28E77D24F31D}"
77
EndProject
8-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HarfBuzzSharp", "..\..\binding\HarfBuzzSharp\HarfBuzzSharp.csproj", "{38FFD397-8A5E-421A-8649-24FE463E1DE9}"
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HarfBuzzSharp", "..\binding\HarfBuzzSharp\HarfBuzzSharp.csproj", "{38FFD397-8A5E-421A-8649-24FE463E1DE9}"
99
EndProject
10-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkiaSharp.HarfBuzz", "..\..\source\SkiaSharp.HarfBuzz\SkiaSharp.HarfBuzz\SkiaSharp.HarfBuzz.csproj", "{0DE402FA-A101-438E-8528-6EA82E0FF803}"
10+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkiaSharp.HarfBuzz", "..\source\SkiaSharp.HarfBuzz\SkiaSharp.HarfBuzz\SkiaSharp.HarfBuzz.csproj", "{0DE402FA-A101-438E-8528-6EA82E0FF803}"
1111
EndProject
12-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkiaSharp.Benchmarks", "SkiaSharp.Benchmarks.csproj", "{8E5284C3-5AAF-4902-B12F-84E9172F20E0}"
12+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkiaSharp.Benchmarks", "SkiaSharp.Benchmarks\SkiaSharp.Benchmarks.csproj", "{8E5284C3-5AAF-4902-B12F-84E9172F20E0}"
1313
EndProject
14-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkiaSharp.SceneGraph", "..\..\binding\SkiaSharp.SceneGraph\SkiaSharp.SceneGraph.csproj", "{42B5D998-A676-4B50-B558-1D3ACA7D3FC4}"
14+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkiaSharp.SceneGraph", "..\binding\SkiaSharp.SceneGraph\SkiaSharp.SceneGraph.csproj", "{42B5D998-A676-4B50-B558-1D3ACA7D3FC4}"
1515
EndProject
16-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkiaSharp.Skottie", "..\..\binding\SkiaSharp.Skottie\SkiaSharp.Skottie.csproj", "{DD03EAA1-A85D-4588-8B84-8285EC1979C8}"
16+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SkiaSharp.Skottie", "..\binding\SkiaSharp.Skottie\SkiaSharp.Skottie.csproj", "{DD03EAA1-A85D-4588-8B84-8285EC1979C8}"
1717
EndProject
1818
Global
1919
GlobalSection(SolutionConfigurationPlatforms) = preSolution

benchmarks/SkiaSharp.Benchmarks/Benchmarks/Benchmarks.cs

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using System;
2+
using System.Buffers;
3+
using System.IO;
4+
using BenchmarkDotNet.Attributes;
5+
using BenchmarkDotNet.Diagnostics.Windows.Configs;
6+
using BenchmarkDotNet.Jobs;
7+
8+
namespace SkiaSharp.Benchmarks;
9+
10+
// [EtwProfiler]
11+
// [NativeMemoryProfiler]
12+
[MemoryDiagnoser]
13+
[SimpleJob(RuntimeMoniker.Net472)]
14+
[SimpleJob(RuntimeMoniker.Net70)]
15+
public class TheBenchmark
16+
{
17+
[GlobalSetup]
18+
public void GlobalSetup()
19+
{
20+
21+
}
22+
23+
[Benchmark(Baseline = true)]
24+
public void TheBaseline()
25+
{
26+
27+
}
28+
29+
[Benchmark]
30+
public void TheNew()
31+
{
32+
33+
}
34+
}

benchmarks/SkiaSharp.Benchmarks/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ public class Program
66
{
77
public static void Main(string[] args)
88
{
9-
var summary = BenchmarkRunner.Run<Benchmark>();
9+
var summary = BenchmarkRunner.Run<TheBenchmark>();
1010
}
1111
}
Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,34 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2+
23
<PropertyGroup>
34
<OutputType>Exe</OutputType>
4-
<TargetFrameworks>net472;netcoreapp3.1;net6.0</TargetFrameworks>
5+
<TargetFramework>net7.0</TargetFramework>
56
<RootNamespace>SkiaSharp.Benchmarks</RootNamespace>
67
<AssemblyName>SkiaSharp.Benchmarks</AssemblyName>
78
<SkipGenerateAssemblyVersionInfo>true</SkipGenerateAssemblyVersionInfo>
89
<SkipMDocGenerateDocs>true</SkipMDocGenerateDocs>
9-
<SkipCopyToOutputDirectory>true</SkipCopyToOutputDirectory>
1010
<DebugType>pdbonly</DebugType>
1111
<DebugSymbols>true</DebugSymbols>
1212
</PropertyGroup>
13+
1314
<ItemGroup>
14-
<PackageReference Include="BenchmarkDotNet" Version="0.13.1" />
15+
<PackageReference Include="BenchmarkDotNet" Version="0.13.5" />
1516
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.13.1" />
1617
</ItemGroup>
18+
1719
<ItemGroup>
1820
<ProjectReference Include="..\..\binding\HarfBuzzSharp\HarfBuzzSharp.csproj" />
1921
<ProjectReference Include="..\..\binding\SkiaSharp.SceneGraph\SkiaSharp.SceneGraph.csproj" />
2022
<ProjectReference Include="..\..\binding\SkiaSharp.Skottie\SkiaSharp.Skottie.csproj" />
2123
<ProjectReference Include="..\..\binding\SkiaSharp\SkiaSharp.csproj" />
2224
<ProjectReference Include="..\..\source\SkiaSharp.HarfBuzz\SkiaSharp.HarfBuzz\SkiaSharp.HarfBuzz.csproj" />
2325
</ItemGroup>
24-
<ItemGroup>
25-
<Content Include="..\..\output\native\windows\x64\libSkiaSharp.dll" CopyToOutputDirectory="Always" Visible="false" Condition=" Exists('..\..\output\native\windows\x64\libSkiaSharp.dll') or '$(IsWindows)' == 'true' " />
26-
<Content Include="..\..\output\native\windows\x64\libSkiaSharp.pdb" CopyToOutputDirectory="Always" Visible="false" Condition=" Exists('..\..\output\native\windows\x64\libSkiaSharp.pdb') or '$(IsWindows)' == 'true' " />
27-
<Content Include="..\..\output\native\windows\x64\libHarfBuzzSharp.dll" CopyToOutputDirectory="Always" Visible="false" Condition=" Exists('..\..\output\native\windows\x64\libHarfBuzzSharp.dll') or '$(IsWindows)' == 'true' " />
28-
<Content Include="..\..\output\native\windows\x64\libHarfBuzzSharp.pdb" CopyToOutputDirectory="Always" Visible="false" Condition=" Exists('..\..\output\native\windows\x64\libHarfBuzzSharp.pdb') or '$(IsWindows)' == 'true' " />
29-
<Content Include="..\..\output\native\osx\libSkiaSharp.dylib" CopyToOutputDirectory="Always" Visible="false" Condition=" Exists('..\..\output\native\osx\libSkiaSharp.dylib') or '$(IsMacOS)' == 'true' " />
30-
<Content Include="..\..\output\native\osx\libHarfBuzzSharp.dylib" CopyToOutputDirectory="Always" Visible="false" Condition=" Exists('..\..\output\native\osx\libHarfBuzzSharp.dylib') or '$(IsMacOS)' == 'true' " />
31-
<Content Include="..\..\output\native\linux\x64\libSkiaSharp.so" CopyToOutputDirectory="Always" Visible="false" Condition=" Exists('..\..\output\native\linux\x64\libSkiaSharp.so') or '$(IsLinux)' == 'true' " />
32-
<Content Include="..\..\output\native\linux\x64\libHarfBuzzSharp.so" CopyToOutputDirectory="Always" Visible="false" Condition=" Exists('..\..\output\native\linux\x64\libHarfBuzzSharp.so') or '$(IsLinux)' == 'true' " />
33-
</ItemGroup>
26+
3427
<ItemGroup>
3528
<None Remove="BenchmarkDotNet.Artifacts/**" />
3629
</ItemGroup>
30+
31+
<Import Project="..\..\binding\IncludeNativeAssets.SkiaSharp.targets" />
32+
<Import Project="..\..\binding\IncludeNativeAssets.HarfBuzzSharp.targets" />
33+
3734
</Project>

binding/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

binding/Directory.Build.props

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
<Project>
22

3-
<PropertyGroup>
4-
<!-- the binding projects have other things in the project folders -->
5-
<EnableDefaultItems>false</EnableDefaultItems>
6-
</PropertyGroup>
7-
83
<Import Project="$(MSBuildThisFileDirectory)..\source\SkiaSharp.Build.props" />
94

105
</Project>

binding/Directory.Build.targets

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
<Project>
22

3-
<!-- annd some compatibility packages for the really old platforms -->
4-
<ItemGroup Condition="
5-
'$(TargetFramework)' == 'netstandard1.3'">
6-
<PackageReference Include="System.IO.UnmanagedMemoryStream" Version="4.3.0" />
7-
</ItemGroup>
8-
<ItemGroup Condition="
9-
$(TargetFramework.StartsWith('net4')) or
10-
$(TargetFramework.StartsWith('netstandard1')) or
11-
$(TargetFramework.StartsWith('uap10')) or
12-
'$(TargetFramework)' == 'netstandard2.0' or
13-
'$(TargetFramework)' == 'tizen40'">
3+
<ItemGroup Condition=" ($(TargetFramework.StartsWith('net4')) or '$(TargetFramework)' == 'netstandard2.0') and (!$(MSBuildProjectName.Contains('.NativeAssets.'))) ">
144
<PackageReference Include="System.Memory" Version="4.5.5" />
155
</ItemGroup>
166

7+
<PropertyGroup Condition="'$(PackagingGroup)' == 'SkiaSharp'">
8+
<PackageDescription Condition="'$(PackageDescription)' == ''">SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library.
9+
It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.</PackageDescription>
10+
</PropertyGroup>
11+
12+
<PropertyGroup Condition="'$(PackagingGroup)' == 'HarfBuzzSharp'">
13+
<PackageDescription Condition="'$(PackageDescription)' == ''">HarfBuzzSharp is a cross-platform OpenType text shaping engine for .NET platforms.</PackageDescription>
14+
</PropertyGroup>
15+
16+
<Import Project="$(MSBuildThisFileDirectory)NativeAssets.Build.targets" Condition="$(MSBuildProjectName.Contains('.NativeAssets.'))" />
17+
1718
<Import Project="$(MSBuildThisFileDirectory)..\source\SkiaSharp.Build.targets" />
1819

1920
</Project>

0 commit comments

Comments
 (0)