diff --git a/binding/Binding/SKManagedStream.cs b/binding/Binding/SKManagedStream.cs index cc83c90e..26b5d436 100644 --- a/binding/Binding/SKManagedStream.cs +++ b/binding/Binding/SKManagedStream.cs @@ -11,6 +11,7 @@ using System.Runtime.InteropServices; using System.IO; using System.Collections.Generic; using System.Diagnostics; +using System.Text; #if __IOS__ using ObjCRuntime; @@ -144,10 +145,13 @@ namespace SkiaSharp { var managedStream = AsManagedStream (managedStreamPtr); var count = (int)size; - var managedBuffer = new byte[count]; - var result = managedStream.stream.Read (managedBuffer, 0, count); + byte[] managedBuffer; + using (var reader = new BinaryReader (managedStream.stream, Encoding.UTF8, true)) { + managedBuffer = reader.ReadBytes (count); + } + var result = managedBuffer.Length; if (buffer != IntPtr.Zero) { - Marshal.Copy (managedBuffer, 0, buffer, count); + Marshal.Copy (managedBuffer, 0, buffer, result); } return (IntPtr)result; } @@ -162,10 +166,13 @@ namespace SkiaSharp } var oldPos = managedStream.stream.Position; var count = (int)size; - var managedBuffer = new byte[count]; - var result = managedStream.stream.Read (managedBuffer, 0, count); + byte[] managedBuffer; + using (var reader = new BinaryReader (managedStream.stream, Encoding.UTF8, true)) { + managedBuffer = reader.ReadBytes (count); + } + var result = managedBuffer.Length; if (buffer != IntPtr.Zero) { - Marshal.Copy (managedBuffer, 0, buffer, count); + Marshal.Copy (managedBuffer, 0, buffer, result); } managedStream.stream.Position = oldPos; return (IntPtr)result; diff --git a/binding/Binding/SkiaApi.cs b/binding/Binding/SkiaApi.cs index abc96878..f10c1fc7 100755 --- a/binding/Binding/SkiaApi.cs +++ b/binding/Binding/SkiaApi.cs @@ -78,7 +78,7 @@ namespace SkiaSharp #elif __MACOS__ private const string SKIA = "libSkiaSharp.dylib"; #elif DESKTOP - private const string SKIA = "libSkiaSharp.dll"; // redirected using .dll.config to 'libSkiaSharp.dylib' on OS X + private const string SKIA = "libSkiaSharp"; #elif WINDOWS_UWP private const string SKIA = "libSkiaSharp.dll"; #elif NET_STANDARD diff --git a/binding/HarfBuzzSharp.Android/HarfBuzzSharp.Android.csproj b/binding/HarfBuzzSharp.Android/HarfBuzzSharp.Android.csproj index a6ffb03b..fd91df8a 100644 --- a/binding/HarfBuzzSharp.Android/HarfBuzzSharp.Android.csproj +++ b/binding/HarfBuzzSharp.Android/HarfBuzzSharp.Android.csproj @@ -49,9 +49,6 @@ - - - libs\arm64-v8a\libHarfBuzzSharp.so @@ -66,4 +63,7 @@ libs\x86_64\libHarfBuzzSharp.so + + + \ No newline at end of file diff --git a/binding/HarfBuzzSharp.Desktop/nuget/build/net45/HarfBuzzSharp.dll.config b/binding/HarfBuzzSharp.Desktop/nuget/build/net45/HarfBuzzSharp.dll.config index 35aaf22c..2036ebeb 100644 --- a/binding/HarfBuzzSharp.Desktop/nuget/build/net45/HarfBuzzSharp.dll.config +++ b/binding/HarfBuzzSharp.Desktop/nuget/build/net45/HarfBuzzSharp.dll.config @@ -1,5 +1,5 @@ - - + + diff --git a/binding/HarfBuzzSharp.OSX/HarfBuzzSharp.OSX.csproj b/binding/HarfBuzzSharp.OSX/HarfBuzzSharp.OSX.csproj index 9a9bb88d..df70b197 100644 --- a/binding/HarfBuzzSharp.OSX/HarfBuzzSharp.OSX.csproj +++ b/binding/HarfBuzzSharp.OSX/HarfBuzzSharp.OSX.csproj @@ -13,6 +13,7 @@ Resources true ..\..\mono.snk + MSB9004 true @@ -71,7 +72,7 @@ - - + + \ No newline at end of file diff --git a/binding/HarfBuzzSharp.Shared/HarfBuzzApi.cs b/binding/HarfBuzzSharp.Shared/HarfBuzzApi.cs index 20bd089c..b566198d 100644 --- a/binding/HarfBuzzSharp.Shared/HarfBuzzApi.cs +++ b/binding/HarfBuzzSharp.Shared/HarfBuzzApi.cs @@ -28,7 +28,7 @@ namespace HarfBuzzSharp #elif __MACOS__ private const string HARFBUZZ = "libHarfBuzzSharp.dylib"; #elif DESKTOP - private const string HARFBUZZ = "libHarfBuzzSharp.dll"; // redirected using .dll.config to 'libHarfBuzzSharp.dylib' on OS X + private const string HARFBUZZ = "libHarfBuzzSharp"; #elif WINDOWS_UWP private const string HARFBUZZ = "libHarfBuzzSharp.dll"; #elif NET_STANDARD diff --git a/binding/HarfBuzzSharp.UWP/HarfBuzzSharp.UWP.csproj b/binding/HarfBuzzSharp.UWP/HarfBuzzSharp.UWP.csproj index 2a7f8654..59d0ca89 100644 --- a/binding/HarfBuzzSharp.UWP/HarfBuzzSharp.UWP.csproj +++ b/binding/HarfBuzzSharp.UWP/HarfBuzzSharp.UWP.csproj @@ -39,8 +39,7 @@ 4 - - + @@ -52,11 +51,4 @@ 14.0 - \ No newline at end of file diff --git a/binding/HarfBuzzSharp.UWP/project.json b/binding/HarfBuzzSharp.UWP/project.json deleted file mode 100644 index c5949392..00000000 --- a/binding/HarfBuzzSharp.UWP/project.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "dependencies": { - "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0" - }, - "frameworks": { - "uap10.0": {} - }, - "runtimes": { - "win10-arm": {}, - "win10-arm-aot": {}, - "win10-x86": {}, - "win10-x86-aot": {}, - "win10-x64": {}, - "win10-x64-aot": {} - } -} \ No newline at end of file diff --git a/binding/HarfBuzzSharp.iOS/HarfBuzzSharp.iOS.csproj b/binding/HarfBuzzSharp.iOS/HarfBuzzSharp.iOS.csproj index 1c4c13c9..bab9de84 100644 --- a/binding/HarfBuzzSharp.iOS/HarfBuzzSharp.iOS.csproj +++ b/binding/HarfBuzzSharp.iOS/HarfBuzzSharp.iOS.csproj @@ -11,6 +11,7 @@ Resources true ..\..\mono.snk + MSB9004 true @@ -46,7 +47,7 @@ - - + + \ No newline at end of file diff --git a/binding/HarfBuzzSharp.tvOS/HarfBuzzSharp.tvOS.csproj b/binding/HarfBuzzSharp.tvOS/HarfBuzzSharp.tvOS.csproj index 7ff4e0ba..bb7c5ff6 100644 --- a/binding/HarfBuzzSharp.tvOS/HarfBuzzSharp.tvOS.csproj +++ b/binding/HarfBuzzSharp.tvOS/HarfBuzzSharp.tvOS.csproj @@ -11,6 +11,7 @@ Resources true ..\..\mono.snk + MSB9004 true @@ -48,7 +49,7 @@ libHarfBuzzSharp.a - - + + \ No newline at end of file diff --git a/binding/SkiaSharp.Android/SkiaSharp.Android.csproj b/binding/SkiaSharp.Android/SkiaSharp.Android.csproj index 901a1ecc..555a37b0 100644 --- a/binding/SkiaSharp.Android/SkiaSharp.Android.csproj +++ b/binding/SkiaSharp.Android/SkiaSharp.Android.csproj @@ -48,7 +48,7 @@ - + diff --git a/binding/SkiaSharp.Desktop/nuget/build/net45/SkiaSharp.dll.config b/binding/SkiaSharp.Desktop/nuget/build/net45/SkiaSharp.dll.config index 3d0bbb1e..4080db5c 100644 --- a/binding/SkiaSharp.Desktop/nuget/build/net45/SkiaSharp.dll.config +++ b/binding/SkiaSharp.Desktop/nuget/build/net45/SkiaSharp.dll.config @@ -1,5 +1,5 @@ - - + + diff --git a/binding/SkiaSharp.OSX/SkiaSharp.OSX.csproj b/binding/SkiaSharp.OSX/SkiaSharp.OSX.csproj index 66f8cd9a..9638def0 100644 --- a/binding/SkiaSharp.OSX/SkiaSharp.OSX.csproj +++ b/binding/SkiaSharp.OSX/SkiaSharp.OSX.csproj @@ -13,6 +13,7 @@ v2.0 true ..\..\mono.snk + MSB9004 true @@ -56,7 +57,7 @@ - + diff --git a/binding/SkiaSharp.UWP/SkiaSharp.UWP.csproj b/binding/SkiaSharp.UWP/SkiaSharp.UWP.csproj index 48d23935..b1da9f95 100644 --- a/binding/SkiaSharp.UWP/SkiaSharp.UWP.csproj +++ b/binding/SkiaSharp.UWP/SkiaSharp.UWP.csproj @@ -11,7 +11,7 @@ SkiaSharp en-US UAP - 10.0.10240.0 + 10.0.10240.0 10.0.10240.0 14 512 @@ -41,8 +41,7 @@ true - - + @@ -54,11 +53,4 @@ 14.0 - \ No newline at end of file diff --git a/binding/SkiaSharp.UWP/project.json b/binding/SkiaSharp.UWP/project.json deleted file mode 100644 index c5949392..00000000 --- a/binding/SkiaSharp.UWP/project.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "dependencies": { - "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0" - }, - "frameworks": { - "uap10.0": {} - }, - "runtimes": { - "win10-arm": {}, - "win10-arm-aot": {}, - "win10-x86": {}, - "win10-x86-aot": {}, - "win10-x64": {}, - "win10-x64-aot": {} - } -} \ No newline at end of file diff --git a/binding/SkiaSharp.iOS/SkiaSharp.iOS.csproj b/binding/SkiaSharp.iOS/SkiaSharp.iOS.csproj index cf5fb5fa..e00fa2b1 100644 --- a/binding/SkiaSharp.iOS/SkiaSharp.iOS.csproj +++ b/binding/SkiaSharp.iOS/SkiaSharp.iOS.csproj @@ -11,6 +11,7 @@ SkiaSharp true ..\..\mono.snk + MSB9004 true @@ -54,7 +55,7 @@ Framework - + \ No newline at end of file diff --git a/binding/SkiaSharp.tvOS/SkiaSharp.tvOS.csproj b/binding/SkiaSharp.tvOS/SkiaSharp.tvOS.csproj index a9a1e7ca..97e4f263 100644 --- a/binding/SkiaSharp.tvOS/SkiaSharp.tvOS.csproj +++ b/binding/SkiaSharp.tvOS/SkiaSharp.tvOS.csproj @@ -11,6 +11,7 @@ SkiaSharp true ..\..\mono.snk + MSB9004 true @@ -54,7 +55,7 @@ Framework - + \ No newline at end of file diff --git a/build.cake b/build.cake index 24ddf7d3..16efe553 100644 --- a/build.cake +++ b/build.cake @@ -1,6 +1,7 @@ -#addin "Cake.Xamarin" -#addin "Cake.XCode" -#addin "Cake.FileHelpers" +#addin nuget:?package=Cake.Xamarin&version=1.3.0.15 +#addin nuget:?package=Cake.XCode&version=2.0.13 +#addin nuget:?package=Cake.FileHelpers&version=1.0.4 + #reference "tools/SharpCompress/lib/net45/SharpCompress.dll" using System.Linq; @@ -243,7 +244,7 @@ Task ("tests") // .NET Core EnsureDirectoryExists ("./output/tests/netcore"); - RunDotNetCoreRestore ("./tests/SkiaSharp.NetCore.Tests.Runner/SkiaSharp.NetCore.Tests.Runner.sln"); + RunNuGetRestore ("./tests/SkiaSharp.NetCore.Tests.Runner/SkiaSharp.NetCore.Tests.Runner.sln"); DotNetCorePublish ("./tests/SkiaSharp.NetCore.Tests.Runner", new DotNetCorePublishSettings { Configuration = "Release", OutputDirectory = "./tests/SkiaSharp.NetCore.Tests.Runner/artifacts/" diff --git a/cake.packages.config b/cake.packages.config index 62200713..e578c4d9 100644 --- a/cake.packages.config +++ b/cake.packages.config @@ -1,9 +1,9 @@ - - - + + + - + diff --git a/cake/UtilsManaged.cake b/cake/UtilsManaged.cake index 2be806ab..820565e4 100644 --- a/cake/UtilsManaged.cake +++ b/cake/UtilsManaged.cake @@ -2,21 +2,17 @@ using System.Runtime.InteropServices; using SharpCompress.Readers; var VERBOSITY_NUGET = NuGetVerbosity.Detailed; -var VERBOSITY_NUGETCORE = DotNetCoreRestoreVerbosity.Verbose; switch (VERBOSITY) { case Verbosity.Quiet: case Verbosity.Minimal: VERBOSITY_NUGET = NuGetVerbosity.Quiet; - VERBOSITY_NUGETCORE = DotNetCoreRestoreVerbosity.Minimal; break; case Verbosity.Normal: VERBOSITY_NUGET = NuGetVerbosity.Normal; - VERBOSITY_NUGETCORE = DotNetCoreRestoreVerbosity.Warning; break; case Verbosity.Verbose: case Verbosity.Diagnostic: VERBOSITY_NUGET = NuGetVerbosity.Detailed; - VERBOSITY_NUGETCORE = DotNetCoreRestoreVerbosity.Verbose; break; }; @@ -29,14 +25,6 @@ var RunNuGetRestore = new Action ((solution) => }); }); -var RunDotNetCoreRestore = new Action ((solution) => -{ - DotNetCoreRestore (solution, new DotNetCoreRestoreSettings { - Sources = NuGetSources, - // Verbosity = VERBOSITY_NUGETCORE // TODO: v1.1.1 has different values ??? - }); -}); - var RunMSBuildWithPlatform = new Action ((solution, platform) => { MSBuild (solution, c => { diff --git a/docs/en/SkiaSharp/SKImage.xml b/docs/en/SkiaSharp/SKImage.xml index d9d0fc23..c7322cee 100644 --- a/docs/en/SkiaSharp/SKImage.xml +++ b/docs/en/SkiaSharp/SKImage.xml @@ -185,12 +185,10 @@ The file format used to encode the image. - The quality level to use for the image. + The quality level to use for the image. This is in the range from 0-100. Encodes the image using the specified format. Returns the  wrapping the encoded image. - - - + The quality is a suggestion, and not all formats (eg: png) respect or support it. diff --git a/externals/api-doc-tools b/externals/api-doc-tools index 49569287..f51d2af5 160000 --- a/externals/api-doc-tools +++ b/externals/api-doc-tools @@ -1 +1 @@ -Subproject commit 495692876090ed829275254bf16b31e47950a43d +Subproject commit f51d2af552e63de7d72555a5c61d9c2a28b7faa0 diff --git a/externals/depot_tools b/externals/depot_tools index a3b67ae2..ced744fa 160000 --- a/externals/depot_tools +++ b/externals/depot_tools @@ -1 +1 @@ -Subproject commit a3b67ae2a7a9a94299255e14600cd1127ad39b20 +Subproject commit ced744fa465542223771a7383edadba107e6c041 diff --git a/native-builds/libHarfBuzzSharp_uwp/libHarfBuzzSharp.vcxproj b/native-builds/libHarfBuzzSharp_uwp/libHarfBuzzSharp.vcxproj index 8b045a8a..9ad3dce4 100644 --- a/native-builds/libHarfBuzzSharp_uwp/libHarfBuzzSharp.vcxproj +++ b/native-builds/libHarfBuzzSharp_uwp/libHarfBuzzSharp.vcxproj @@ -167,35 +167,35 @@ DynamicLibrary true - v140 + v141 DynamicLibrary true - v140 + v141 DynamicLibrary true - v140 + v141 DynamicLibrary false true - v140 + v141 DynamicLibrary false true - v140 + v141 DynamicLibrary false true - v140 + v141 diff --git a/native-builds/libSkiaSharp_uwp/libSkiaSharp.vcxproj b/native-builds/libSkiaSharp_uwp/libSkiaSharp.vcxproj index ad184c6b..7226d344 100644 --- a/native-builds/libSkiaSharp_uwp/libSkiaSharp.vcxproj +++ b/native-builds/libSkiaSharp_uwp/libSkiaSharp.vcxproj @@ -41,39 +41,39 @@ DynamicLibrary true - v140 + v141 DynamicLibrary false Unicode - v140 + v141 true DynamicLibrary true Unicode - v140 + v141 DynamicLibrary false Unicode - v140 + v141 true DynamicLibrary true Unicode - v140 + v141 DynamicLibrary false Unicode - v140 + v141 true diff --git a/nuget/HarfBuzzSharp.Linux.nuspec b/nuget/HarfBuzzSharp.Linux.nuspec index ccc6f49b..9807f04a 100644 --- a/nuget/HarfBuzzSharp.Linux.nuspec +++ b/nuget/HarfBuzzSharp.Linux.nuspec @@ -12,6 +12,7 @@ https://github.com/mono/SkiaSharp/blob/master/LICENSE.md https://github.com/mono/SkiaSharp https://cdn.rawgit.com/mono/SkiaSharp/v1.53.0/images/skia_256x256.png + xamarin,text,harfbuzz,ios,android,linux,windows,uwp,tvos,macos,cross-platform,harfbuzzsharp diff --git a/nuget/HarfBuzzSharp.Mac.nuspec b/nuget/HarfBuzzSharp.Mac.nuspec index 4a4fd610..92a8f05a 100644 --- a/nuget/HarfBuzzSharp.Mac.nuspec +++ b/nuget/HarfBuzzSharp.Mac.nuspec @@ -12,6 +12,7 @@ https://github.com/mono/SkiaSharp/blob/master/LICENSE.md https://github.com/mono/SkiaSharp https://cdn.rawgit.com/mono/SkiaSharp/v1.53.0/images/skia_256x256.png + xamarin,text,harfbuzz,ios,android,linux,windows,uwp,tvos,macos,cross-platform,harfbuzzsharp diff --git a/nuget/HarfbuzzSharp.Windows.nuspec b/nuget/HarfbuzzSharp.Windows.nuspec index 78722f2c..08190fee 100644 --- a/nuget/HarfbuzzSharp.Windows.nuspec +++ b/nuget/HarfbuzzSharp.Windows.nuspec @@ -12,6 +12,7 @@ https://github.com/mono/SkiaSharp/blob/master/LICENSE.md https://github.com/mono/SkiaSharp https://cdn.rawgit.com/mono/SkiaSharp/v1.53.0/images/skia_256x256.png + xamarin,text,harfbuzz,ios,android,linux,windows,uwp,tvos,macos,cross-platform,harfbuzzsharp diff --git a/nuget/HarfbuzzSharp.nuspec b/nuget/HarfbuzzSharp.nuspec index 074abb95..3ef2b666 100644 --- a/nuget/HarfbuzzSharp.nuspec +++ b/nuget/HarfbuzzSharp.nuspec @@ -12,6 +12,7 @@ https://github.com/mono/SkiaSharp/blob/master/LICENSE.md https://github.com/mono/SkiaSharp https://cdn.rawgit.com/mono/SkiaSharp/v1.53.0/images/skia_256x256.png + xamarin,text,harfbuzz,ios,android,linux,windows,uwp,tvos,macos,cross-platform,harfbuzzsharp diff --git a/samples/AppStoreCertificates/Skia.UWP.Demo_StoreKey.pfx b/samples/AppStoreCertificates/Skia.UWP.Demo_StoreKey.pfx index 70174b57..a026a0ba 100644 Binary files a/samples/AppStoreCertificates/Skia.UWP.Demo_StoreKey.pfx and b/samples/AppStoreCertificates/Skia.UWP.Demo_StoreKey.pfx differ diff --git a/samples/FormsSample/Android/Android.csproj b/samples/FormsSample/Android/Android.csproj index 0e50d20c..b12d68ae 100644 --- a/samples/FormsSample/Android/Android.csproj +++ b/samples/FormsSample/Android/Android.csproj @@ -53,11 +53,13 @@ - - + + + - - + + + @@ -75,13 +77,11 @@ Assets\Media\content-font.ttf + - - - @@ -96,8 +96,6 @@ - - diff --git a/samples/FormsSample/Core/Core.csproj b/samples/FormsSample/Core/Core.csproj index b24a7868..1ddfbf44 100644 --- a/samples/FormsSample/Core/Core.csproj +++ b/samples/FormsSample/Core/Core.csproj @@ -1,23 +1,92 @@  - + + - netstandard1.3 + 11.0 + Debug + AnyCPU + {E01FBABA-8DA1-432B-9253-F4ABE13A3A6A} + Library + Properties SkiaSharpSample.FormsSample - portable-net45+win8+wpa81+wp8 + SkiaSharpSample.FormsSample + 512 + v4.5 + Profile259 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + + true full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 - - + + + - - + + - - - + + App.xaml + + + DetailContentsPage.xaml + + + DetailsPage.xaml + + + MainPage.xaml + + + MasterPage.xaml + + + + + + Designer + MSBuild:UpdateDesignTimeXaml + + + Designer + MSBuild:UpdateDesignTimeXaml + + + + + MSBuild:UpdateDesignTimeXaml + Designer + + + + + MSBuild:UpdateDesignTimeXaml + Designer + + + + + MSBuild:UpdateDesignTimeXaml + Designer + + \ No newline at end of file diff --git a/samples/FormsSample/Mac/Mac.csproj b/samples/FormsSample/Mac/Mac.csproj index 6f2d7d3d..9ae317ce 100644 --- a/samples/FormsSample/Mac/Mac.csproj +++ b/samples/FormsSample/Mac/Mac.csproj @@ -28,6 +28,9 @@ true true true + + + @@ -43,6 +46,8 @@ true true SdkOnly + + @@ -51,11 +56,13 @@ - - + + - - + + + + @@ -63,6 +70,10 @@ Core + + + + @@ -77,17 +88,10 @@ - - - - - - Resources\content-font.ttf - @@ -95,6 +99,9 @@ + + Resources\content-font.ttf + diff --git a/samples/FormsSample/UWP/Package.appxmanifest b/samples/FormsSample/UWP/Package.appxmanifest index 464706e5..76647be1 100644 --- a/samples/FormsSample/UWP/Package.appxmanifest +++ b/samples/FormsSample/UWP/Package.appxmanifest @@ -1,7 +1,7 @@  - - + + SkiaSharp for Xamarin.Forms .NET Development Addict diff --git a/samples/FormsSample/UWP/UWP.csproj b/samples/FormsSample/UWP/UWP.csproj index b5438efb..56f8232d 100644 --- a/samples/FormsSample/UWP/UWP.csproj +++ b/samples/FormsSample/UWP/UWP.csproj @@ -11,14 +11,14 @@ SkiaSharpSample.FormsSample.UWP en-US UAP - 10.0.10240.0 + 10.0.10240.0 10.0.10240.0 14 true 512 {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - ..\..\AppStoreCertificates\Skia.UWP.Demo_StoreKey.pfx - 77BB456C567B1501535FACDA67D559B9513862C1 + ..\..\AppStoreCertificates\Skia.UWP.Demo_StoreKey.pfx + A9102DF7FB3501F23B65D59B624A9CB05C065366 False Always x86|x64|arm @@ -93,8 +93,24 @@ true - - + + + + + + + + + + + {e3d24d5e-80b0-45e1-ad55-d69d00bfa5f8} + Core + + + + + Windows Mobile Extensions for the UWP + @@ -137,17 +153,6 @@ Designer - - - {e3d24d5e-80b0-45e1-ad55-d69d00bfa5f8} - Core - - - - - Windows Mobile Extensions for the UWP - - 14.0 diff --git a/samples/FormsSample/iOS/iOS.csproj b/samples/FormsSample/iOS/iOS.csproj index 30e12a48..a36b8fcf 100644 --- a/samples/FormsSample/iOS/iOS.csproj +++ b/samples/FormsSample/iOS/iOS.csproj @@ -11,6 +11,7 @@ SkiaSharpSample.FormsSample.Platform Resources SkiaSharpSampleFormsSampleiOS + true @@ -113,11 +114,13 @@ - - + + + - - + + + @@ -128,30 +131,11 @@ - Resources\content-font.ttf - - - - - - - - - - - - false - - - - - - @@ -162,6 +146,13 @@ + + + + + + + diff --git a/samples/MacSample/MacSample/MacSample.csproj b/samples/MacSample/MacSample/MacSample.csproj index a5b7aabc..8cdcb4ca 100644 --- a/samples/MacSample/MacSample/MacSample.csproj +++ b/samples/MacSample/MacSample/MacSample.csproj @@ -48,16 +48,16 @@ - + - - + + - + @@ -91,7 +91,7 @@ Resources\content-font.ttf - - + + \ No newline at end of file diff --git a/samples/TvSample/TvSample/TvSample.csproj b/samples/TvSample/TvSample/TvSample.csproj index 8cc5c805..9564b68f 100644 --- a/samples/TvSample/TvSample/TvSample.csproj +++ b/samples/TvSample/TvSample/TvSample.csproj @@ -87,10 +87,18 @@ - - + + - + + + + + + + + ViewController.cs + @@ -117,14 +125,6 @@ - - - - - - ViewController.cs - - @@ -133,7 +133,7 @@ Resources\content-font.ttf - - + + \ No newline at end of file diff --git a/samples/UWPSample/UWPSample/Package.appxmanifest b/samples/UWPSample/UWPSample/Package.appxmanifest index 8e18f23c..55803de2 100644 --- a/samples/UWPSample/UWPSample/Package.appxmanifest +++ b/samples/UWPSample/UWPSample/Package.appxmanifest @@ -1,10 +1,10 @@  - + SkiaSharpSample.UWPSample - mattl + Matthew Assets\StoreLogo.png diff --git a/samples/UWPSample/UWPSample/UWPSample.csproj b/samples/UWPSample/UWPSample/UWPSample.csproj index 083dd2df..24246f23 100644 --- a/samples/UWPSample/UWPSample/UWPSample.csproj +++ b/samples/UWPSample/UWPSample/UWPSample.csproj @@ -11,12 +11,13 @@ SkiaSharpSample.UWPSample en-US UAP - 10.0.10240.0 + 10.0.10240.0 10.0.10240.0 14 512 {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} UWPSample_TemporaryKey.pfx + 2022055027C3EEA154DFF420144910E67613D8D6 true @@ -88,12 +89,27 @@ true - + + + + + + + + + + + Windows Desktop Extensions for the UWP + + + Windows Mobile Extensions for the UWP + + + Assets\Media\content-font.ttf Always - @@ -130,14 +146,6 @@ Designer - - - Windows Desktop Extensions for the UWP - - - Windows Mobile Extensions for the UWP - - @@ -145,11 +153,4 @@ 14.0 - \ No newline at end of file diff --git a/samples/UWPSample/UWPSample/UWPSample_TemporaryKey.pfx b/samples/UWPSample/UWPSample/UWPSample_TemporaryKey.pfx index b5a0a7db..1975786e 100644 Binary files a/samples/UWPSample/UWPSample/UWPSample_TemporaryKey.pfx and b/samples/UWPSample/UWPSample/UWPSample_TemporaryKey.pfx differ diff --git a/samples/WPFSample/WPFSample/WPFSample.csproj b/samples/WPFSample/WPFSample/WPFSample.csproj index ecb57c09..231095f1 100644 --- a/samples/WPFSample/WPFSample/WPFSample.csproj +++ b/samples/WPFSample/WPFSample/WPFSample.csproj @@ -97,10 +97,11 @@ - - + + + - + @@ -119,8 +120,6 @@ MainWindow.xaml Code - - Code @@ -134,6 +133,8 @@ Settings.settings True + + ResXFileCodeGenerator Resources.Designer.cs @@ -146,9 +147,6 @@ SettingsSingleFileGenerator Settings.Designer.cs - - - diff --git a/samples/WindowsSample/WindowsSample/WindowsSample.csproj b/samples/WindowsSample/WindowsSample/WindowsSample.csproj index 093b4ccd..44e4155e 100644 --- a/samples/WindowsSample/WindowsSample/WindowsSample.csproj +++ b/samples/WindowsSample/WindowsSample/WindowsSample.csproj @@ -91,10 +91,11 @@ - - + + + - + diff --git a/source/SkiaSharp.HarfBuzz/SkiaSharp.HarfBuzz.NetStandard/SkiaSharp.HarfBuzz.NetStandard.csproj b/source/SkiaSharp.HarfBuzz/SkiaSharp.HarfBuzz.NetStandard/SkiaSharp.HarfBuzz.NetStandard.csproj index 71e9f245..376ca5c8 100644 --- a/source/SkiaSharp.HarfBuzz/SkiaSharp.HarfBuzz.NetStandard/SkiaSharp.HarfBuzz.NetStandard.csproj +++ b/source/SkiaSharp.HarfBuzz/SkiaSharp.HarfBuzz.NetStandard/SkiaSharp.HarfBuzz.NetStandard.csproj @@ -26,5 +26,5 @@ - + \ No newline at end of file diff --git a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Android/SkiaSharp.Views.Forms.Android.csproj b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Android/SkiaSharp.Views.Forms.Android.csproj index 713cbf9d..299893ea 100644 --- a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Android/SkiaSharp.Views.Forms.Android.csproj +++ b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Android/SkiaSharp.Views.Forms.Android.csproj @@ -45,12 +45,6 @@ - - - - - - {c737dc80-5b71-4b26-a2dc-da30421788b0} @@ -61,7 +55,13 @@ SkiaSharp.Views.Android - + + + + + + + \ No newline at end of file diff --git a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Mac/SkiaSharp.Views.Forms.Mac.csproj b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Mac/SkiaSharp.Views.Forms.Mac.csproj index 2098f96f..f1b3286d 100644 --- a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Mac/SkiaSharp.Views.Forms.Mac.csproj +++ b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Mac/SkiaSharp.Views.Forms.Mac.csproj @@ -46,13 +46,7 @@ - - - - - - - + @@ -64,7 +58,13 @@ SkiaSharp.OSX - - + + + + + + + + \ No newline at end of file diff --git a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Native.Shared/SKCanvasViewRendererBase.cs b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Native.Shared/SKCanvasViewRendererBase.cs index 9b33f065..90f6a6e5 100644 --- a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Native.Shared/SKCanvasViewRendererBase.cs +++ b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Native.Shared/SKCanvasViewRendererBase.cs @@ -165,9 +165,9 @@ namespace SkiaSharp.Views.Forms } // the user asked for the size - private void OnGetCanvasSize(object sender, GetCanvasSizeEventArgs e) + private void OnGetCanvasSize(object sender, GetPropertyValueEventArgs e) { - e.CanvasSize = Control?.CanvasSize ?? SKSize.Empty; + e.Value = Control?.CanvasSize ?? SKSize.Empty; } } } diff --git a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Native.Shared/SKGLViewRendererBase.cs b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Native.Shared/SKGLViewRendererBase.cs index ffa21f16..16a83422 100644 --- a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Native.Shared/SKGLViewRendererBase.cs +++ b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Native.Shared/SKGLViewRendererBase.cs @@ -51,6 +51,8 @@ namespace SkiaSharp.Views.Forms #endif } + public GRContext GRContext => Control.GRContext; + #if __IOS__ protected void SetDisablesUserInteraction(bool disablesUserInteraction) { @@ -67,6 +69,7 @@ namespace SkiaSharp.Views.Forms // unsubscribe from events oldController.SurfaceInvalidated -= OnSurfaceInvalidated; oldController.GetCanvasSize -= OnGetCanvasSize; + oldController.GetGRContext -= OnGetGRContext; } if (e.NewElement != null) @@ -90,6 +93,7 @@ namespace SkiaSharp.Views.Forms // subscribe to events from the user newController.SurfaceInvalidated += OnSurfaceInvalidated; newController.GetCanvasSize += OnGetCanvasSize; + newController.GetGRContext += OnGetGRContext; // start the rendering SetupRenderLoop(false); @@ -163,9 +167,15 @@ namespace SkiaSharp.Views.Forms } // the user asked for the size - private void OnGetCanvasSize(object sender, GetCanvasSizeEventArgs e) + private void OnGetCanvasSize(object sender, GetPropertyValueEventArgs e) { - e.CanvasSize = Control?.CanvasSize ?? SKSize.Empty; + e.Value = Control?.CanvasSize ?? SKSize.Empty; + } + + // the user asked for the current GRContext + private void OnGetGRContext(object sender, GetPropertyValueEventArgs e) + { + e.Value = Control?.GRContext; } private void OnPaintSurface(object sender, SKNativePaintGLSurfaceEventArgs e) diff --git a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Shared/RendererTypes.cs b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Shared/RendererTypes.cs index ecfe39c6..22138b8f 100644 --- a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Shared/RendererTypes.cs +++ b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Shared/RendererTypes.cs @@ -2,8 +2,8 @@ namespace SkiaSharp.Views.Forms { - internal class GetCanvasSizeEventArgs : EventArgs + internal class GetPropertyValueEventArgs : EventArgs { - public SKSize CanvasSize { get; set; } + public T Value { get; set; } } } diff --git a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Shared/SKCanvasView.cs b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Shared/SKCanvasView.cs index 30e75bee..591ebd61 100644 --- a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Shared/SKCanvasView.cs +++ b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Shared/SKCanvasView.cs @@ -20,7 +20,7 @@ namespace SkiaSharp.Views.Forms // the native listens to this event private event EventHandler SurfaceInvalidated; - private event EventHandler GetCanvasSize; + private event EventHandler> GetCanvasSize; // the user asks the for the size public SKSize CanvasSize @@ -28,9 +28,9 @@ namespace SkiaSharp.Views.Forms get { // send a mesage to the native view - var args = new GetCanvasSizeEventArgs(); + var args = new GetPropertyValueEventArgs(); GetCanvasSize?.Invoke(this, args); - return args.CanvasSize; + return args.Value; } } @@ -73,7 +73,7 @@ namespace SkiaSharp.Views.Forms remove { SurfaceInvalidated -= value; } } - event EventHandler ISKCanvasViewController.GetCanvasSize + event EventHandler> ISKCanvasViewController.GetCanvasSize { add { GetCanvasSize += value; } remove { GetCanvasSize -= value; } @@ -99,7 +99,7 @@ namespace SkiaSharp.Views.Forms { // the native listens to this event event EventHandler SurfaceInvalidated; - event EventHandler GetCanvasSize; + event EventHandler> GetCanvasSize; // the native view tells the user to repaint void OnPaintSurface(SKPaintSurfaceEventArgs e); diff --git a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Shared/SKGLView.cs b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Shared/SKGLView.cs index 8f8bb518..5cb4cfa4 100644 --- a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Shared/SKGLView.cs +++ b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Shared/SKGLView.cs @@ -32,7 +32,8 @@ namespace SkiaSharp.Views.Forms // the native listens to this event private event EventHandler SurfaceInvalidated; - private event EventHandler GetCanvasSize; + private event EventHandler> GetCanvasSize; + private event EventHandler> GetGRContext; // the user asks the for the size public SKSize CanvasSize @@ -40,9 +41,21 @@ namespace SkiaSharp.Views.Forms get { // send a mesage to the native view - var args = new GetCanvasSizeEventArgs(); + var args = new GetPropertyValueEventArgs(); GetCanvasSize?.Invoke(this, args); - return args.CanvasSize; + return args.Value; + } + } + + // the user asks the for the current GRContext + public GRContext GRContext + { + get + { + // send a mesage to the native view + var args = new GetPropertyValueEventArgs(); + GetGRContext?.Invoke(this, args); + return args.Value; } } @@ -73,12 +86,18 @@ namespace SkiaSharp.Views.Forms remove { SurfaceInvalidated -= value; } } - event EventHandler ISKGLViewController.GetCanvasSize + event EventHandler> ISKGLViewController.GetCanvasSize { add { GetCanvasSize += value; } remove { GetCanvasSize -= value; } } + event EventHandler> ISKGLViewController.GetGRContext + { + add { GetGRContext += value; } + remove { GetGRContext -= value; } + } + void ISKGLViewController.OnPaintSurface(SKPaintGLSurfaceEventArgs e) { OnPaintSurface(e); @@ -99,7 +118,8 @@ namespace SkiaSharp.Views.Forms { // the native listens to this event event EventHandler SurfaceInvalidated; - event EventHandler GetCanvasSize; + event EventHandler> GetCanvasSize; + event EventHandler> GetGRContext; // the native view tells the user to repaint void OnPaintSurface(SKPaintGLSurfaceEventArgs e); diff --git a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.UWP/SkiaSharp.Views.Forms.UWP.csproj b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.UWP/SkiaSharp.Views.Forms.UWP.csproj index 13b7a66b..12459133 100644 --- a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.UWP/SkiaSharp.Views.Forms.UWP.csproj +++ b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.UWP/SkiaSharp.Views.Forms.UWP.csproj @@ -11,7 +11,7 @@ SkiaSharp.Views.Forms en-US UAP - 10.0.10240.0 + 10.0.10240.0 10.0.10240.0 14 512 @@ -37,15 +37,8 @@ 4 - - - - - - - - - + + @@ -57,17 +50,17 @@ SkiaSharp.Views.UWP + + + + + + + 14.0 - \ No newline at end of file diff --git a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.UWP/SkiaSharp.Views.Forms.UWP.nuget.targets b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.UWP/SkiaSharp.Views.Forms.UWP.nuget.targets deleted file mode 100644 index 099cd039..00000000 --- a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.UWP/SkiaSharp.Views.Forms.UWP.nuget.targets +++ /dev/null @@ -1,18 +0,0 @@ - - - - True - NuGet - C:\Projects\SkiaSharp\source\SkiaSharp.Views.Forms\SkiaSharp.Views.Forms.UWP\project.lock.json - $(UserProfile)\.nuget\packages\ - C:\Users\mattl\.nuget\packages\ - ProjectJson - 4.1.0 - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - - - - - \ No newline at end of file diff --git a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.UWP/project.json b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.UWP/project.json deleted file mode 100644 index 75e1d446..00000000 --- a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.UWP/project.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "dependencies": { - "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0", - "Xamarin.Forms": "2.3.4.231" - }, - "frameworks": { - "uap10.0": {} - }, - "runtimes": { - "win10-arm": {}, - "win10-arm-aot": {}, - "win10-x86": {}, - "win10-x86-aot": {}, - "win10-x64": {}, - "win10-x64-aot": {} - } -} \ No newline at end of file diff --git a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.iOS/SkiaSharp.Views.Forms.iOS.csproj b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.iOS/SkiaSharp.Views.Forms.iOS.csproj index 58d52644..8c3843b9 100644 --- a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.iOS/SkiaSharp.Views.Forms.iOS.csproj +++ b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.iOS/SkiaSharp.Views.Forms.iOS.csproj @@ -20,6 +20,12 @@ 4 true true + + + + + + true @@ -30,6 +36,12 @@ 4 true true + + + + + + @@ -40,12 +52,6 @@ - - - - - - {6a678cfb-21a7-4e81-8909-fd72abbfd408} @@ -58,7 +64,13 @@ false - + + + + + + + \ No newline at end of file diff --git a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.csproj b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.csproj index a7410856..5b820150 100644 --- a/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.csproj +++ b/source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.csproj @@ -40,6 +40,6 @@ - + \ No newline at end of file diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.Android/SKCanvasView.cs b/source/SkiaSharp.Views/SkiaSharp.Views.Android/SKCanvasView.cs index 9459360c..8409b565 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.Android/SKCanvasView.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.Android/SKCanvasView.cs @@ -132,8 +132,11 @@ namespace SkiaSharp.Views.Android protected override void Dispose(bool disposing) { + if (disposing) + { + FreeBitmap(); + } base.Dispose(disposing); - FreeBitmap(); } private void FreeBitmap() diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.Android/SKGLSurfaceView.cs b/source/SkiaSharp.Views/SkiaSharp.Views.Android/SKGLSurfaceView.cs index 1c1774c0..07413081 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.Android/SKGLSurfaceView.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.Android/SKGLSurfaceView.cs @@ -32,6 +32,8 @@ namespace SkiaSharp.Views.Android public SKSize CanvasSize => renderer.CanvasSize; + public GRContext GRContext => renderer.GRContext; + public virtual void SetRenderer(ISKRenderer renderer) { skRenderer = renderer; diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.Android/SKGLSurfaceViewRenderer.cs b/source/SkiaSharp.Views/SkiaSharp.Views.Android/SKGLSurfaceViewRenderer.cs index 27c1fca5..edc4bae4 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.Android/SKGLSurfaceViewRenderer.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.Android/SKGLSurfaceViewRenderer.cs @@ -13,6 +13,8 @@ namespace SkiaSharp.Views.Android public SKSize CanvasSize => new SKSize(renderTarget.Width, renderTarget.Height); + public GRContext GRContext => context; + protected abstract void OnDrawFrame(SKSurface surface, GRBackendRenderTargetDesc renderTarget); public void OnDrawFrame(IGL10 gl) @@ -79,8 +81,11 @@ namespace SkiaSharp.Views.Android protected override void Dispose(bool disposing) { + if (disposing) + { + FreeContext(); + } base.Dispose(disposing); - FreeContext(); } private void FreeContext() diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.Android/SKSurfaceView.cs b/source/SkiaSharp.Views/SkiaSharp.Views.Android/SKSurfaceView.cs index 75cc45e2..6c1c900a 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.Android/SKSurfaceView.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.Android/SKSurfaceView.cs @@ -71,8 +71,11 @@ namespace SkiaSharp.Views.Android protected override void Dispose(bool disposing) { + if (disposing) + { + FreeBitmap(); + } base.Dispose(disposing); - FreeBitmap(); } private void CreateBitmap(int width, int height) diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.AppleiOS/SKCanvasView.cs b/source/SkiaSharp.Views/SkiaSharp.Views.AppleiOS/SKCanvasView.cs index cea37742..76b6b7f7 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.AppleiOS/SKCanvasView.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.AppleiOS/SKCanvasView.cs @@ -17,7 +17,9 @@ namespace SkiaSharp.Views.iOS public class SKCanvasView : UIView, IComponent { // for IComponent +#pragma warning disable 67 private event EventHandler DisposedInternal; +#pragma warning restore 67 ISite IComponent.Site { get; set; } event EventHandler IComponent.Disposed { diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.AppleiOS/SKGLLayer.cs b/source/SkiaSharp.Views/SkiaSharp.Views.AppleiOS/SKGLLayer.cs index 094b784f..3ffb5f12 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.AppleiOS/SKGLLayer.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.AppleiOS/SKGLLayer.cs @@ -30,6 +30,8 @@ namespace SkiaSharp.Views.iOS public SKSize CanvasSize => new SKSize(renderTarget.Width, renderTarget.Height); + public GRContext GRContext => context; + public virtual void Render() { if (glContext == null) diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.AppleiOS/SKGLView.cs b/source/SkiaSharp.Views/SkiaSharp.Views.AppleiOS/SKGLView.cs index 36c1a4e4..7869a30f 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.AppleiOS/SKGLView.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.AppleiOS/SKGLView.cs @@ -18,7 +18,9 @@ namespace SkiaSharp.Views.iOS public class SKGLView : GLKView, IGLKViewDelegate, IComponent { // for IComponent +#pragma warning disable 67 private event EventHandler DisposedInternal; +#pragma warning restore 67 ISite IComponent.Site { get; set; } event EventHandler IComponent.Disposed { @@ -75,6 +77,8 @@ namespace SkiaSharp.Views.iOS public SKSize CanvasSize => new SKSize(renderTarget.Width, renderTarget.Height); + public GRContext GRContext => context; + public new void DrawInRect(GLKView view, CGRect rect) { if (designMode) diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.Desktop/SKGLControl.cs b/source/SkiaSharp.Views/SkiaSharp.Views.Desktop/SKGLControl.cs index 1e51f438..630fd343 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.Desktop/SKGLControl.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.Desktop/SKGLControl.cs @@ -21,6 +21,8 @@ namespace SkiaSharp.Views.Desktop public SKSize CanvasSize => new SKSize(renderTarget.Width, renderTarget.Height); + public GRContext GRContext => grContext; + public event EventHandler PaintSurface; protected override void OnPaint(PaintEventArgs e) diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.Desktop/SkiaSharp.Views.Desktop.csproj b/source/SkiaSharp.Views/SkiaSharp.Views.Desktop/SkiaSharp.Views.Desktop.csproj index 0281dcfa..e875e581 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.Desktop/SkiaSharp.Views.Desktop.csproj +++ b/source/SkiaSharp.Views/SkiaSharp.Views.Desktop/SkiaSharp.Views.Desktop.csproj @@ -14,8 +14,6 @@ true ..\..\..\mono.snk - - true @@ -45,14 +43,6 @@ - - - Component - - - UserControl - - {eb1bbdcc-fb07-40d5-8b9e-0079e2c2f2df} @@ -60,7 +50,8 @@ - + + diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.Mac/SKGLLayer.cs b/source/SkiaSharp.Views/SkiaSharp.Views.Mac/SKGLLayer.cs index 5fb5472d..61f12c65 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.Mac/SKGLLayer.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.Mac/SKGLLayer.cs @@ -20,6 +20,8 @@ namespace SkiaSharp.Views.Mac public SKSize CanvasSize => new SKSize(renderTarget.Width, renderTarget.Height); + public GRContext GRContext => context; + public event EventHandler PaintSurface; public virtual void DrawInSurface(SKSurface surface, GRBackendRenderTargetDesc renderTarget) diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.Mac/SKGLView.cs b/source/SkiaSharp.Views/SkiaSharp.Views.Mac/SKGLView.cs index 45280469..8fd40942 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.Mac/SKGLView.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.Mac/SKGLView.cs @@ -63,6 +63,8 @@ namespace SkiaSharp.Views.Mac public SKSize CanvasSize => new SKSize(renderTarget.Width, renderTarget.Height); + public GRContext GRContext => context; + public override void PrepareOpenGL() { base.PrepareOpenGL(); diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.UWP/SKSwapChainPanel.cs b/source/SkiaSharp.Views/SkiaSharp.Views.UWP/SKSwapChainPanel.cs index c736bcf8..012d6e1d 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.UWP/SKSwapChainPanel.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.UWP/SKSwapChainPanel.cs @@ -25,6 +25,8 @@ namespace SkiaSharp.Views.UWP public SKSize CanvasSize => new SKSize(renderTarget.Width, renderTarget.Height); + public GRContext GRContext => context; + protected override Size ArrangeOverride(Size finalSize) { var arrange = base.ArrangeOverride(finalSize); diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.UWP/SkiaSharp.Views.UWP.csproj b/source/SkiaSharp.Views/SkiaSharp.Views.UWP/SkiaSharp.Views.UWP.csproj index 6aeeb07c..5f590d49 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.UWP/SkiaSharp.Views.UWP.csproj +++ b/source/SkiaSharp.Views/SkiaSharp.Views.UWP/SkiaSharp.Views.UWP.csproj @@ -11,7 +11,7 @@ SkiaSharp.Views.UWP en-US UAP - 10.0.10240.0 + 10.0.10240.0 10.0.10240.0 14 512 @@ -39,8 +39,13 @@ 4 - - + + + + + {bab615aa-956e-4079-b260-dd7b1f52ec7d} + SkiaSharp.UWP + @@ -53,22 +58,9 @@ - - - {bab615aa-956e-4079-b260-dd7b1f52ec7d} - SkiaSharp.UWP - - 14.0 - \ No newline at end of file diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.UWP/project.json b/source/SkiaSharp.Views/SkiaSharp.Views.UWP/project.json deleted file mode 100644 index c5949392..00000000 --- a/source/SkiaSharp.Views/SkiaSharp.Views.UWP/project.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "dependencies": { - "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0" - }, - "frameworks": { - "uap10.0": {} - }, - "runtimes": { - "win10-arm": {}, - "win10-arm-aot": {}, - "win10-x86": {}, - "win10-x86-aot": {}, - "win10-x64": {}, - "win10-x64-aot": {} - } -} \ No newline at end of file diff --git a/tests/SkiaSharp.Desktop.Tests/SkiaSharp.Desktop.Tests.csproj b/tests/SkiaSharp.Desktop.Tests/SkiaSharp.Desktop.Tests.csproj index d39eef40..8a49db5d 100644 --- a/tests/SkiaSharp.Desktop.Tests/SkiaSharp.Desktop.Tests.csproj +++ b/tests/SkiaSharp.Desktop.Tests/SkiaSharp.Desktop.Tests.csproj @@ -84,8 +84,22 @@ - - + + + + + + {2ae5d8c5-eac6-4515-89f2-a4994b41c925} + HarfBuzzSharp.Desktop + + + {eb1bbdcc-fb07-40d5-8b9e-0079e2c2f2df} + SkiaSharp.Desktop + + + {7cad1912-05a5-42e5-b7ba-81bb051f0566} + SkiaSharp.HarfBuzz + @@ -175,23 +189,6 @@ Always - - - {2ae5d8c5-eac6-4515-89f2-a4994b41c925} - HarfBuzzSharp.Desktop - - - {eb1bbdcc-fb07-40d5-8b9e-0079e2c2f2df} - SkiaSharp.Desktop - - - {7cad1912-05a5-42e5-b7ba-81bb051f0566} - SkiaSharp.HarfBuzz - - - - - diff --git a/tests/SkiaSharp.NetCore.Tests.Runner/SkiaSharp.NetCore.Tests.Runner.csproj b/tests/SkiaSharp.NetCore.Tests.Runner/SkiaSharp.NetCore.Tests.Runner.csproj index 8b13fd1e..fcdda811 100644 --- a/tests/SkiaSharp.NetCore.Tests.Runner/SkiaSharp.NetCore.Tests.Runner.csproj +++ b/tests/SkiaSharp.NetCore.Tests.Runner/SkiaSharp.NetCore.Tests.Runner.csproj @@ -6,6 +6,7 @@ exe + 1.1.1 diff --git a/tests/SkiaSharp.NetCore.Tests/SkiaSharp.NetCore.Tests.csproj b/tests/SkiaSharp.NetCore.Tests/SkiaSharp.NetCore.Tests.csproj index 7862a81b..e7e6cd85 100644 --- a/tests/SkiaSharp.NetCore.Tests/SkiaSharp.NetCore.Tests.csproj +++ b/tests/SkiaSharp.NetCore.Tests/SkiaSharp.NetCore.Tests.csproj @@ -12,6 +12,11 @@ $(PackageTargetFallback);portable-net451+win8 1.1.1 + + + + + @@ -30,9 +35,4 @@ PreserveNewest - - - - - \ No newline at end of file