Skip to content

Commit 86ed75e

Browse files
committedJul 11, 2022
Add back the SkiaSharp libs and Samples
1 parent 91ea9d5 commit 86ed75e

38 files changed

+964
-270
lines changed
 

‎Microsoft.Maui.Graphics.slnf

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"solution": {
3+
"path": "Microsoft.Maui.sln",
4+
"projects": [
5+
"src\\Graphics\\samples\\GraphicsTester.Android\\GraphicsTester.Android.csproj",
6+
"src\\Graphics\\samples\\GraphicsTester.MacCatalyst\\GraphicsTester.MacCatalyst.csproj",
7+
"src\\Graphics\\samples\\GraphicsTester.Mac\\GraphicsTester.Mac.csproj",
8+
"src\\Graphics\\samples\\GraphicsTester.Portable\\GraphicsTester.Portable.csproj",
9+
"src\\Graphics\\samples\\GraphicsTester.Skia.Console\\GraphicsTester.Skia.Console.csproj",
10+
"src\\Graphics\\samples\\GraphicsTester.Skia.Gtk\\GraphicsTester.Skia.Gtk.csproj",
11+
"src\\Graphics\\samples\\GraphicsTester.Skia.Mac\\GraphicsTester.Skia.Mac.csproj",
12+
"src\\Graphics\\samples\\GraphicsTester.Skia.Tizen\\GraphicsTester.Skia.Tizen.csproj",
13+
"src\\Graphics\\samples\\GraphicsTester.Skia.Windows\\GraphicsTester.Skia.Windows.csproj",
14+
"src\\Graphics\\samples\\GraphicsTester.WinUI.Desktop\\GraphicsTester.WinUI.Desktop.csproj",
15+
"src\\Graphics\\samples\\GraphicsTester.iOS\\GraphicsTester.iOS.csproj",
16+
"src\\Graphics\\src\\Graphics.Skia.GtkSharp\\Graphics.Skia.GtkSharp.csproj",
17+
"src\\Graphics\\src\\Graphics.Skia.WPF\\Graphics.Skia.WPF.csproj",
18+
"src\\Graphics\\src\\Graphics.Skia\\Graphics.Skia.csproj",
19+
"src\\Graphics\\src\\Graphics.Win2D\\Graphics.Win2D.csproj",
20+
"src\\Graphics\\src\\Graphics\\Graphics.csproj",
21+
"src\\Graphics\\src\\Text.Markdig\\Graphics.Text.Markdig.csproj",
22+
"src\\Graphics\\tests\\Graphics.Benchmarks\\Graphics.Benchmarks.csproj",
23+
"src\\Graphics\\tests\\Graphics.Tests\\Graphics.Tests.csproj"
24+
]
25+
}
26+
}

‎Microsoft.Maui.sln

+23
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GraphicsTester.Skia.Windows
244244
EndProject
245245
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GraphicsTester.WinUI.Desktop", "src\Graphics\samples\GraphicsTester.WinUI.Desktop\GraphicsTester.WinUI.Desktop.csproj", "{4BF0AF30-6E18-47D8-B90C-E99C1917BEF5}"
246246
EndProject
247+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Graphics.Skia.GtkSharp", "src\Graphics\src\Graphics.Skia.GtkSharp\Graphics.Skia.GtkSharp.csproj", "{AFD9D653-08C4-456C-AA1B-F5C9F621D655}"
248+
EndProject
249+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Graphics.Skia.WPF", "src\Graphics\src\Graphics.Skia.WPF\Graphics.Skia.WPF.csproj", "{F26D31D3-CE4C-4F32-A77F-E2905C948674}"
250+
EndProject
251+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GraphicsTester.Skia.Gtk", "src\Graphics\samples\GraphicsTester.Skia.Gtk\GraphicsTester.Skia.Gtk.csproj", "{F351A992-18E4-473C-8ADD-2BA0BAA7B5A2}"
252+
EndProject
247253
Global
248254
GlobalSection(SolutionConfigurationPlatforms) = preSolution
249255
Debug|Any CPU = Debug|Any CPU
@@ -602,8 +608,22 @@ Global
602608
{8441FA70-9041-4727-91B9-2F39881CC0EE}.Release|Any CPU.Build.0 = Release|Any CPU
603609
{4BF0AF30-6E18-47D8-B90C-E99C1917BEF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
604610
{4BF0AF30-6E18-47D8-B90C-E99C1917BEF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
611+
{4BF0AF30-6E18-47D8-B90C-E99C1917BEF5}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
605612
{4BF0AF30-6E18-47D8-B90C-E99C1917BEF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
606613
{4BF0AF30-6E18-47D8-B90C-E99C1917BEF5}.Release|Any CPU.Build.0 = Release|Any CPU
614+
{4BF0AF30-6E18-47D8-B90C-E99C1917BEF5}.Release|Any CPU.Deploy.0 = Release|Any CPU
615+
{AFD9D653-08C4-456C-AA1B-F5C9F621D655}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
616+
{AFD9D653-08C4-456C-AA1B-F5C9F621D655}.Debug|Any CPU.Build.0 = Debug|Any CPU
617+
{AFD9D653-08C4-456C-AA1B-F5C9F621D655}.Release|Any CPU.ActiveCfg = Release|Any CPU
618+
{AFD9D653-08C4-456C-AA1B-F5C9F621D655}.Release|Any CPU.Build.0 = Release|Any CPU
619+
{F26D31D3-CE4C-4F32-A77F-E2905C948674}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
620+
{F26D31D3-CE4C-4F32-A77F-E2905C948674}.Debug|Any CPU.Build.0 = Debug|Any CPU
621+
{F26D31D3-CE4C-4F32-A77F-E2905C948674}.Release|Any CPU.ActiveCfg = Release|Any CPU
622+
{F26D31D3-CE4C-4F32-A77F-E2905C948674}.Release|Any CPU.Build.0 = Release|Any CPU
623+
{F351A992-18E4-473C-8ADD-2BA0BAA7B5A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
624+
{F351A992-18E4-473C-8ADD-2BA0BAA7B5A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
625+
{F351A992-18E4-473C-8ADD-2BA0BAA7B5A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
626+
{F351A992-18E4-473C-8ADD-2BA0BAA7B5A2}.Release|Any CPU.Build.0 = Release|Any CPU
607627
EndGlobalSection
608628
GlobalSection(SolutionProperties) = preSolution
609629
HideSolutionNode = FALSE
@@ -717,6 +737,9 @@ Global
717737
{20756558-1284-42D6-AB7B-3E59DF8A6B34} = {1BA0121E-0B83-4C8F-81BE-C293E7E35DCE}
718738
{8441FA70-9041-4727-91B9-2F39881CC0EE} = {1BA0121E-0B83-4C8F-81BE-C293E7E35DCE}
719739
{4BF0AF30-6E18-47D8-B90C-E99C1917BEF5} = {1BA0121E-0B83-4C8F-81BE-C293E7E35DCE}
740+
{AFD9D653-08C4-456C-AA1B-F5C9F621D655} = {42AB9AE1-631D-4AD4-85B7-910FF0940BDB}
741+
{F26D31D3-CE4C-4F32-A77F-E2905C948674} = {42AB9AE1-631D-4AD4-85B7-910FF0940BDB}
742+
{F351A992-18E4-473C-8ADD-2BA0BAA7B5A2} = {1BA0121E-0B83-4C8F-81BE-C293E7E35DCE}
720743
EndGlobalSection
721744
GlobalSection(ExtensibilityGlobals) = postSolution
722745
SolutionGuid = {0B8ABEAD-D2B5-4370-A187-62B5ABE4EE50}
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>net6.0-android</TargetFramework>
5-
<OutputType>Exe</OutputType>
6-
<RootNamespace>GraphicsTester.Android</RootNamespace>
7-
<ImplicitUsings>enable</ImplicitUsings>
8-
<LangVersion>10.0</LangVersion>
9-
<SupportedOSPlatformVersion>21.0</SupportedOSPlatformVersion>
10-
<ApplicationId>com.microsoft.maui.graphicstester</ApplicationId>
11-
<ApplicationVersion>1</ApplicationVersion>
12-
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
13-
</PropertyGroup>
3+
<PropertyGroup>
4+
<TargetFramework>net6.0-android</TargetFramework>
5+
<OutputType>Exe</OutputType>
6+
<RootNamespace>GraphicsTester.Android</RootNamespace>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<LangVersion>10.0</LangVersion>
9+
<SupportedOSPlatformVersion>21.0</SupportedOSPlatformVersion>
10+
<ApplicationId>com.microsoft.maui.graphicstester</ApplicationId>
11+
<ApplicationVersion>1</ApplicationVersion>
12+
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
13+
<IsPackable>false</IsPackable>
14+
</PropertyGroup>
1415

15-
<ItemGroup>
16-
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics.Skia\Microsoft.Maui.Graphics.Skia.csproj" />
17-
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics\Microsoft.Maui.Graphics.csproj" />
18-
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics.Text.Markdig\Microsoft.Maui.Graphics.Text.Markdig.csproj" />
19-
<ProjectReference Include="..\GraphicsTester.Portable\GraphicsTester.Portable.csproj" />
20-
</ItemGroup>
16+
<ItemGroup>
17+
<ProjectReference Include="..\..\src\Graphics.Skia\Graphics.Skia.csproj" />
18+
<ProjectReference Include="..\..\src\Graphics\Graphics.csproj" />
19+
<ProjectReference Include="..\..\src\Text.Markdig\Graphics.Text.Markdig.csproj" />
20+
<ProjectReference Include="..\GraphicsTester.Portable\GraphicsTester.Portable.csproj" />
21+
</ItemGroup>
2122

2223
</Project>
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,22 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>net6.0-macos</TargetFramework>
5-
<OutputType>Exe</OutputType>
6-
<RootNamespace>GraphicsTester.Mac</RootNamespace>
7-
<ImplicitUsings>enable</ImplicitUsings>
8-
<LangVersion>10.0</LangVersion>
9-
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-macos'">10.14</SupportedOSPlatformVersion>
10-
</PropertyGroup>
3+
<PropertyGroup>
4+
<TargetFramework>net6.0-macos</TargetFramework>
5+
<OutputType>Exe</OutputType>
6+
<RootNamespace>GraphicsTester.Mac</RootNamespace>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<LangVersion>10.0</LangVersion>
9+
<SupportedOSPlatformVersion>10.14</SupportedOSPlatformVersion>
10+
<IsPackable>false</IsPackable>
11+
<EnableCodeSigning>false</EnableCodeSigning>
12+
<UseSGen>false</UseSGen>
13+
</PropertyGroup>
1114

12-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
13-
<EnableCodeSigning>false</EnableCodeSigning>
14-
<UseSGen>false</UseSGen>
15-
</PropertyGroup>
16-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
17-
<EnableCodeSigning>false</EnableCodeSigning>
18-
<UseSGen>false</UseSGen>
19-
</PropertyGroup>
20-
<ItemGroup>
21-
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics.Skia\Microsoft.Maui.Graphics.Skia.csproj" />
22-
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics\Microsoft.Maui.Graphics.csproj" />
23-
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics.Text.Markdig\Microsoft.Maui.Graphics.Text.Markdig.csproj" />
24-
<ProjectReference Include="..\GraphicsTester.Portable\GraphicsTester.Portable.csproj" />
25-
</ItemGroup>
15+
<ItemGroup>
16+
<ProjectReference Include="..\..\src\Graphics.Skia\Graphics.Skia.csproj" />
17+
<ProjectReference Include="..\..\src\Graphics\Graphics.csproj" />
18+
<ProjectReference Include="..\..\src\Text.Markdig\Graphics.Text.Markdig.csproj" />
19+
<ProjectReference Include="..\GraphicsTester.Portable\GraphicsTester.Portable.csproj" />
20+
</ItemGroup>
2621

2722
</Project>

‎src/Graphics/samples/GraphicsTester.Mac/MainWindow.cs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ namespace GraphicsTester.Mac
88
{
99
public partial class MainWindow : AppKit.NSWindow
1010
{
11-
private TesterView testerView;
12-
1311
// Called when created from unmanaged code
1412
public MainWindow (IntPtr handle) : base (handle)
1513
{
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>net6.0-maccatalyst</TargetFramework>
5-
<OutputType>Exe</OutputType>
6-
<RootNamespace>GraphicsTester.MacCatalyst</RootNamespace>
7-
<ImplicitUsings>enable</ImplicitUsings>
8-
<LangVersion>10.0</LangVersion>
9-
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-maccatalyst'">14.2</SupportedOSPlatformVersion>
10-
</PropertyGroup>
3+
<PropertyGroup>
4+
<TargetFramework>net6.0-maccatalyst</TargetFramework>
5+
<OutputType>Exe</OutputType>
6+
<RootNamespace>GraphicsTester.MacCatalyst</RootNamespace>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<LangVersion>10.0</LangVersion>
9+
<SupportedOSPlatformVersion>14.2</SupportedOSPlatformVersion>
10+
<IsPackable>false</IsPackable>
11+
</PropertyGroup>
1112

12-
<ItemGroup>
13-
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics.Skia\Microsoft.Maui.Graphics.Skia.csproj" />
14-
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics\Microsoft.Maui.Graphics.csproj" />
15-
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics.Text.Markdig\Microsoft.Maui.Graphics.Text.Markdig.csproj" />
16-
<ProjectReference Include="..\GraphicsTester.Portable\GraphicsTester.Portable.csproj" />
17-
</ItemGroup>
13+
<ItemGroup>
14+
<ProjectReference Include="..\..\src\Graphics.Skia\Graphics.Skia.csproj" />
15+
<ProjectReference Include="..\..\src\Graphics\Graphics.csproj" />
16+
<ProjectReference Include="..\..\src\Text.Markdig\Graphics.Text.Markdig.csproj" />
17+
<ProjectReference Include="..\GraphicsTester.Portable\GraphicsTester.Portable.csproj" />
18+
</ItemGroup>
1819

1920
</Project>

‎src/Graphics/samples/GraphicsTester.MacCatalyst/Main.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ static void Main(string[] args)
99
{
1010
// if you want to use a different Application Delegate class from "AppDelegate"
1111
// you can specify it here.
12-
UIApplication.Main(args, null, "AppDelegate");
12+
UIApplication.Main(args, null, typeof(AppDelegate));
1313
}
1414
}
1515
}

‎src/Graphics/samples/GraphicsTester.MacCatalyst/TesterTableViewSource.cs

+2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ public override UITableViewCell GetCell(UITableView tableView, NSIndexPath index
1919
cell = new UITableViewCell(UITableViewCellStyle.Default, "cell");
2020
}
2121

22+
#pragma warning disable CA1416 // Validate platform compatibility
2223
cell.TextLabel.Text = ScenarioList.Scenarios[indexPath.Row].ToString();
24+
#pragma warning restore CA1416 // Validate platform compatibility
2325

2426
return cell;
2527
}
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
5-
<AssemblyName>GraphicsTester.Portable</AssemblyName>
6-
<RootNamespace>GraphicsTester</RootNamespace>
7-
<Version>2.0.0</Version>
8-
</PropertyGroup>
3+
<PropertyGroup>
4+
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
5+
<AssemblyName>GraphicsTester.Portable</AssemblyName>
6+
<RootNamespace>GraphicsTester</RootNamespace>
7+
<Version>2.0.0</Version>
8+
<IsPackable>false</IsPackable>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<Compile Remove="Properties\**" />
13+
<EmbeddedResource Remove="Properties\**" />
14+
<None Remove="Properties\**" />
15+
</ItemGroup>
16+
17+
<ItemGroup>
18+
<EmbeddedResource Include="Resources\royals.png" />
19+
<EmbeddedResource Include="Resources\swirl_pattern.png" />
20+
</ItemGroup>
21+
22+
<ItemGroup>
23+
<PackageReference Include="Markdig" Version="0.22.1" />
24+
</ItemGroup>
25+
26+
<ItemGroup>
27+
<ProjectReference Include="..\..\src\Graphics\Graphics.csproj" />
28+
<ProjectReference Include="..\..\src\Text.Markdig\Graphics.Text.Markdig.csproj" />
29+
</ItemGroup>
930

10-
<ItemGroup>
11-
<Compile Remove="Properties\**" />
12-
<EmbeddedResource Remove="Properties\**" />
13-
<None Remove="Properties\**" />
14-
</ItemGroup>
15-
<ItemGroup>
16-
<None Remove="Resources\royals.png" />
17-
<None Remove="Resources\swirl_pattern.png" />
18-
</ItemGroup>
19-
<ItemGroup>
20-
<EmbeddedResource Include="Resources\royals.png" />
21-
<EmbeddedResource Include="Resources\swirl_pattern.png" />
22-
</ItemGroup>
23-
<ItemGroup>
24-
<PackageReference Include="Markdig" Version="0.22.1" />
25-
</ItemGroup>
26-
<ItemGroup>
27-
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics\Microsoft.Maui.Graphics.csproj" />
28-
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics.Text.Markdig\Microsoft.Maui.Graphics.Text.Markdig.csproj" />
29-
</ItemGroup>
3031
</Project>
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
6-
<RootNamespace>GraphicsTester.ConsoleApp</RootNamespace>
7-
</PropertyGroup>
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net6.0</TargetFramework>
6+
<RootNamespace>GraphicsTester.ConsoleApp</RootNamespace>
7+
<IsPackable>false</IsPackable>
8+
</PropertyGroup>
89

9-
<ItemGroup>
10-
<ProjectReference Include="..\..\src\Microsoft.Maui.Graphics.Skia\Microsoft.Maui.Graphics.Skia.csproj" />
11-
<ProjectReference Include="..\GraphicsTester.Portable\GraphicsTester.Portable.csproj" />
12-
</ItemGroup>
13-
<ItemGroup>
14-
<PackageReference Include="SkiaSharp" Version="2.88.0" />
15-
</ItemGroup>
10+
<ItemGroup>
11+
<ProjectReference Include="..\..\src\Graphics.Skia\Graphics.Skia.csproj" />
12+
<ProjectReference Include="..\GraphicsTester.Portable\GraphicsTester.Portable.csproj" />
13+
</ItemGroup>
14+
15+
<ItemGroup>
16+
<PackageReference Include="SkiaSharp" Version="2.88.0" />
17+
</ItemGroup>
1618

1719
</Project>

‎src/Graphics/samples/GraphicsTester.Skia.Console/Program.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ static string GetSafeFilename(string text)
4545
}
4646

4747
string safe = new string(chars);
48-
while (safe.Contains("--"))
49-
safe = safe.Replace("--", "-");
48+
while (safe.Contains("--", StringComparison.OrdinalIgnoreCase))
49+
safe = safe.Replace("--", "-", StringComparison.OrdinalIgnoreCase);
5050
return safe.Trim('-');
5151
}
5252
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>WinExe</OutputType>
5+
<TargetFramework>net6.0</TargetFramework>
6+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
7+
<RootNamespace>GraphicsTester.Skia.Gtk</RootNamespace>
8+
<PackageId>GraphicsTester.Skia.Gtk</PackageId>
9+
<IsPackable>false</IsPackable>
10+
</PropertyGroup>
11+
12+
<ItemGroup>
13+
<ProjectReference Include="..\..\src\Graphics.Skia.GtkSharp\Graphics.Skia.GtkSharp.csproj" />
14+
<ProjectReference Include="..\..\src\Graphics\Graphics.csproj" />
15+
<ProjectReference Include="..\GraphicsTester.Portable\GraphicsTester.Portable.csproj" />
16+
</ItemGroup>
17+
18+
<ItemGroup>
19+
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.88.0" />
20+
<PackageReference Include="SkiaSharp.Views.Gtk3" Version="2.88.0" />
21+
<PackageReference Include="GtkSharp" Version="3.24.24.34" />
22+
</ItemGroup>
23+
24+
</Project>

0 commit comments

Comments
 (0)
Please sign in to comment.