Граф коммитов

341 Коммитов

Автор SHA1 Сообщение Дата
Matthew Leibowitz 66ed32a5a0
Build and include all the emscripten version for WASM (#1590)
* Build for the most common Emscripten versions
* Update MSBuild.Sdk.Extras for .NET 5
* Do not rely on WasmHead to detect WebAssembly (#1550)

Co-authored-by: Jerome Laban <jerome.laban@nventive.com>
2021-01-27 06:07:39 +02:00
Matthew Leibowitz e8869d17a6
Use v2 Signing (#1568) 2020-12-27 14:47:09 +02:00
Matthew Leibowitz 13e0b4779a
Register the new HarfBuzzSharp WASM package (#1525) 2020-10-08 16:41:34 +02:00
Matthew Leibowitz 12ec572dc9
Check the correct directory for native libraries with ASP.NET (#1483)
* Added an MVC sample
* Check AppDomain.[RelativeSearchPath|BaseDirectory] for native dlls  
  This is used for runtimes that use app domains, such as IIS Express
* packages.config needs an actual nuget restore
2020-09-02 03:46:58 +02:00
Matthew Leibowitz 2edb63b058
Fix casing of build argument 2020-08-09 17:42:15 +02:00
Matthew Leibowitz 9e80e27059
Create a NuGet containing just the native/nugets (#1456) 2020-08-09 17:11:43 +02:00
Matthew Leibowitz 4bc170cdde
Added Uno Platform support (#1396)
Added the initial Uno implementations, code pulled from:
 - https://github.com/unoplatform/Uno.SkiaSharp
 - https://github.com/mono/SkiaSharp/pull/1333

Co-authored-by: Jérôme Laban <jerome.laban@nventive.com>
Co-authored-by: Geoffrey Huntley <ghuntley@ghuntley.com>
Co-authored-by: Martin Zikmund <martin@zikmund.dev>
2020-07-14 01:46:50 +02:00
Matthew Leibowitz 364f92eea3
Create a WASM package (#1389) 2020-07-08 18:08:26 +02:00
Matthew Leibowitz a3472b0627
Build for Linux ARM32 (armhf) and ARM64 (aarch64) (#1382)
Co-authored-by: jp2masa <jp2masa@users.noreply.github.com>
2020-07-07 02:23:42 +02:00
Matthew Leibowitz 4d412f3f53
Fix #1353 (#1368) 2020-06-30 03:28:11 +02:00
Matthew Leibowitz b647079f7b
Add & Run WASM Unit Tests (#1361) 2020-06-29 19:28:12 +02:00
Matthew Leibowitz 1125d51380
throw! 2020-06-25 22:30:51 +02:00
Matthew Leibowitz b7f920895c
dfasd 2020-06-25 21:54:32 +02:00
Matthew Leibowitz 3238c9496b
Format the generated xml 2020-06-25 21:37:02 +02:00
Matthew Leibowitz 975795246f
Add code coverage to the tests 2020-06-25 17:14:30 +02:00
Matthew Leibowitz e30ebdec35
Build for Vulkan on all supported platforms (#1287) 2020-05-16 03:14:31 +02:00
Matthew Leibowitz 6baf53f3ab
Vulkan Support for Win32 (and APIs for everyone as well) (#1010)
Add support for Vulkan on Win32 (#252)
* Bindings for m80 Vulkan backend context and related types. (#1276, #897)
* Added tests for Vulkan
* Rename the SKColorType enum values (#1222)

Co-authored-by: Davide Tuccilli <davide@gritworld.com>
Co-authored-by: Davide Tuccilli <d.tuccilli@gmail.com>
Co-authored-by: Dariusz Komosiński <darek.komosinski@gmail.com>
2020-05-14 03:01:38 +02:00
Matthew Leibowitz 1c25b69b02
Merge 'master' into 'develop' 2020-05-02 14:44:32 +02:00
Matthew Leibowitz 1aee294bb0
Ensure that the assemblies are in fact signed (#1268) 2020-05-02 10:05:44 +02:00
Matthew Leibowitz 9ad68b65d4
Update to a much later version of skia (m80) (#986)
Several iterations of development to come to this:

* [UWP] Fix the ARM build and add ARM64
* [Win32] GDI is optional - and we don't want it
* Update harfbuzz to v2.6.2
* Use Docker
* Use a later version of the linux tools
* Use VS 2019
* Use Xcode 11
* Go all in with MSVC 14.2
* Disable the Tizen builds for now
* Add support for manually specifying VS (This can be done in a few ways, but the common way would be: --vsinstall='C:\PF\MVS\XXX\YYY')
* Update OpenJDK and Tizen Studio
* Using C++ 17
* Also added a THROW_ON_TEST_FAILURE env var to allow previews to be put out when tests are still failing
* Support basic text alignment
* Implement breakText in native code.
2020-04-28 22:20:20 +02:00
Matthew Leibowitz e2514cda18
[WIP] Add GTK views for Xamarin.Forms (#1089)
* Adding GTK extension methods
* Add initial implementation for Xamarin.Forms GTK
* Better exceptions
* GTK v2 does not build on Windows CI
   This is because of mono not being installed. I could install it, but typically
   this is not available on normal dev boxes. So, to make things easier, just
   build on mac and linux.
2020-01-08 15:35:23 +02:00
Matthew Leibowitz 6cdf2cc73c
Improve the Docker samples (#1051) 2019-12-08 15:21:53 +02:00
Matthew Leibowitz dc9b306e28
Improve native build process + add Nano Server (#1040)
* Add Nano Server to the list (Fixes #676)
* Make separate cake files for native builds
2019-12-04 03:12:12 +02:00
Matthew Leibowitz 71a92e3b3c
Use Docker to Build Linux & Update Versions to v1.68.2 (#1036)
* Update the NuGet versions
* Improve the DevOps build number
* Extract the variable logic from the yaml
* Use Docker to build, and update to Ubuntu 16
2019-11-27 07:49:33 +02:00
Matthew Leibowitz 664995410c
Use better PR labels for build artifacts (#1025) 2019-11-21 05:00:24 +02:00
Matthew Leibowitz 9da3dade94
Use Clang for Windows (m68) (#1007)
* Switch to Clang for Win32
* Make sure to first dispose the native instance  
  In some cases, the native instance has callbacks into the managed world. This can be seen with the documents, they have a flush callback which requires that the managed objects all still exist. This is a valid situation where some object owns other managed objects. It is invalid to have some child object reference the parent object as there is no way of informing the child that it has no parent.
2019-11-11 22:13:41 +02:00
Matthew Leibowitz 32690f42b4
Add some task to generate docs (#997)
* Add some task to generate docs
* Use the new native master
2019-11-05 23:04:27 +02:00
Matthew Leibowitz d16fd524b0
Created a P/Invoke Generator (#992)
* Added the new generator
* split some of the native builds into archs
* Update the native skia
* Generate the interop layer and use it
2019-11-05 19:38:03 +02:00
Matthew Leibowitz ff7cc7823c
Update the docs and reduce diff (#979)
* Adding back some methods to reduce the breaking changes.
* Making sure to force the use of VS2017
* Update all the docs
* Keep the diff in the output
* List the exported symbols on Linux
2019-10-17 14:29:31 +02:00
Matthew Leibowitz c10c7394a2
Some of the colorspaces created are just references (#922)
* Some of the colorspaces created are just references
  - SRGB and SRGB Linear colorspaces are static and should never be disposed
* Fix concurrent disposal and creation
  - In some cases, a new native object is created with the same memory location while the 
    managed instances is still being disposed. In this case, we cannot remove the managed
    instance from the dictionary, since it is not the current object being disposed anymore.
  - SKColorSpace has some members that should not be disposed, since they are static on the
    native side. Just, there is no docs for this, so calling dispose will crash everything.
  - Added the logic to make sure that all static objects are created before anything, so we can 
    get a handle on them and make sure they are static managed instances.
* Make sure the objects are not collected when using spans
2019-09-24 01:34:44 +02:00
Matthew Leibowitz d5aa34a787
Re-work the managed-native types (#900)
Changes:
 - Added `GCHandleProxy` to debug builds
    - this is used to track all `GCHandle` `Alloc` and `Free` calls to ensure that all allocations are freed.
    - added some unit tests to make sure this is actually enforced
    - as a result, several object are now freed correctly
 - Added `ISKReferenceCounted` and `ISKNonVirtualReferenceCounted` interfaces to represent the reference counting types used in the native library
    - this helps with automatically de-referencing objects
 - `SKAbstractManagedStream`, `SKAbstractManagedWStream` and `SKDrawable` have been re-written to use better delegates
   - instead of passing each of the delegates as parameters, they are now a struct that is passed as a single object
   - better for extensions (which there shouldn't be) and only a single static field on the type
   - removed the usage of `Marshal.GetFunctionPointerForDelegate`, which should help out with WASM (see #876)
   - the objects now only keep weak references, meaning that they can now be garbage collected
   - instead of trying to resolve the instances with a dictionary, a delegate is used and passed as "user context"
 - Moved some of the repetitive logic from the types into the base `SKObject` and `SKNativeObject`
    - some logic is automatically executed if the concrete type is `ISKReferenceCounted` or `ISKNonVirtualReferenceCounted`
    - with the more centralized logic and stricter patterns, better tests can be written to make sure all memory is freed correctly and timely
 - `SKData`, `SKFontManager` and `SKTypeface` now correctly prevent disposal of the "static" instances
 - `SKPaint` now references the `Shader`, `MaskFilter`, `ColorFilter`, `ImageFilter`, `Typeface` and `PathEffect` properties
    - this prevents accidental collection, or non-collection when the object goes out of scope
 - the `SKPath` iterators (`Iterator` and `RawIterator`) and op builder (`OpBuilder`) now correctly own and dispose their native objects
 - `SKRegion` objects are now disposed on the native side
 - `SKTypeface` construction from a `SKManagedStream` (via both `SKTypeface` and `SKFontManager`) now copy the contents of the .NET `Stream` into a native memory
    - typeface construction requires multiple seeks (previously, the stream was copied only if it was non-seekable)
    - it also requires "duplicating" the stream, which is not supported on .NET streams
       - duplicates or forks of a stream means that each of the streams need to be read concurrently from different locations
       - .NET streams can only have a single position
 - Updated the NuGets used for the tests
     - using the `Xunit.AssemblyFixture` and `Xunit.SkippableFact` NuGets instead of using the code directly
    - removed the `Xunit.Categories` NuGet as it was preventing tests from running

This PR has a big set of changes that may be breaking due to bug fixes:
 - The `SKAbstractManagedStream`, `SKAbstractManagedWStream` and `SKDrawable` no longer prevent the GC from collecting them. This means that if code no longer references them, they will be disposed. 
    - As far as I can tell, this should not be a problem for the streams as they are never kept around - they are just used for reading and writing and typically only need to live for as long as a single method, and then need to be disposed by the caller. The `SKTypeface` and `SKDocument` do keep it around for a bit, but then they also take ownership of the stream and keep a hard reference to the streams themselves. They will dispose the streams when they are disposed.
    - `SKDrawable` is never kept around and is entirely a user-controlled object. If it goes out of scope, skia doesn't have a reference anyway.
 - The `SKFontManager` and `SKTypeface` no longer use the managed streams (`SKManagedStream` or `Stream`) directly 
- they make a copy.
    - This is simply because skia streams can do things that are not possible for .NET - they can be read concurrently from different positions. If a `SKFileStream` or `SKMemoryStream` are passed, then the streams are not copied.
    - Further optimizations can be made in the case of a `MemoryStream` or `byte[]` to not actually copy but use GC pinning to get a handle to the managed data and work with pointers. But this can be done later so that this PR can be merged and tested.
2019-07-30 03:26:21 +02:00
Matthew Leibowitz e6b7934556
Add the WPF backend for Xamarin.Forms (#917)
Add a new NuGet
- add a targets file to the nuget to warn if the platform packages were not installed

Update the pipeline:
- use build artifacts everywhere
- just disable tizen for Windows
2019-07-26 15:05:54 +02:00
Matthew Leibowitz 5e8dc3e2c9
Split the desktop projects and packages (#899)
* Removed v2.3.1 and renamed Flags to BufferFlags
* Updated some API and Doc
* Add Gtk3 views
* Reworked the samples logic
 - handle the more varied project structure
 - build the generated zip to test it
 - always use the local nuget cache
* macOS is always Any CPU
* Rename SKWidget to SKDrawingArea for GTK#3
 - this allows us to have a single moniker for docs
 - it indicates that it is not quite the same as the widget in GTK#2
 - is is more specific so we can have more GTK# controls
* merge all the views (except forms) into a single moniker so it is better for browsing in the docs portal
* SK3dView is not actually obsolete :)
* Add readmes to the samples
2019-07-23 03:02:20 +02:00
Matthew Leibowitz c4a29d82bf
A few tweaks to harfbuzz (#915) 2019-07-21 21:15:59 +02:00
Matthew Leibowitz 8c9750c87e
Improve the test runners (#903)
- `dotnet build` will fail because `CodeTaskFactory` factory is not supported, so use regular MSBuild properties
 - use the new stages feature
 - .net core tests now use libraries instead of nugets
 - changed a few things in the pipeline yaml
2019-07-13 05:14:48 +02:00
Matthew Leibowitz 79b43682ab
Make sure to use the correct .targets name on Linux (#886)
* Ignore the Prefer32Bit property on linux
* Add nuspec placeholders for non-net45
2019-06-25 21:01:47 +02:00
Matthew Leibowitz e6e6128d2a
Make sure to build Debug samples in PRs (#875)
Just the macOS builds because they use Secure Files
2019-06-22 18:39:32 +02:00
Matthew Leibowitz 097bec3e68
Make sure to remove the correct packages (#859)
* Make sure to remove the correct packages
* Validate the linux packages
2019-06-13 12:38:25 +02:00
Matthew Leibowitz 05f2551f11
Add support for a custom preview label (#857) 2019-06-06 15:33:43 +02:00
Matthew Leibowitz 104ac2caf0
Update build.cake 2019-06-04 07:24:57 +02:00
Matthew Leibowitz 3ef27443f5
Try using a `-` instead of `.` 2019-05-27 19:36:08 +02:00
Matthew Leibowitz ce6b2fbf12
Separate the preview number for sorting 2019-05-25 20:10:29 +02:00
Matthew Leibowitz 3968aaf97c
Few changes for release (#850)
* Add a retry option for the tests because they fail sometimes
* Removing the samples temporarily as they are failing to build
* Updating cake and the bootstrappers
2019-05-24 07:14:37 +02:00
Matthew Leibowitz 5da3cfd412
Support building SkiaSharp without fontconfig (#821) 2019-05-18 15:52:44 -07:00
Matthew Leibowitz 87bd5c6d01
Moving Documentation to SkiaSharp-API-docs (#843)
* Added the docs repo submodule
2019-05-17 11:53:05 -07:00
Matthew Leibowitz 1a9b86ddad
Fixes for the builds 2019-03-13 01:05:37 +02:00
Matthew Leibowitz b88a9de5f6
Remove the mdoc submodule and download from AzDO 2019-03-11 14:00:17 +02:00
Matthew Leibowitz ffdd7bfb50
Fix the tests for non-Windows 2019-02-15 02:45:40 +02:00
Matthew Leibowitz a641470fc9
Skip Signing on Public Builds (#790) 2019-02-14 23:04:20 +02:00
Matthew Leibowitz 962f7be601
Adding iOS/macOS Certificates (#777)
Adding the iOS/macOS/tvOS certificates to the samples job
2019-02-06 00:00:48 +02:00