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

236 Коммитов

Автор SHA1 Сообщение Дата
Matthew Leibowitz 1fa3daddcc
Update the Uno package versions (#1426) 2020-07-24 03:57:30 +02:00
Matthew Leibowitz 4f12a22656
Passing `--configuration=debug` to the bootstrapper now generates a debug library (#1418)
Co-authored-by: Peter Verswyvelen <bugfact@gmail.com>
2020-07-19 17:48:51 +02:00
Matthew Leibowitz 00a535e743
Alpine appears to not be ignoring the request to build without fontconfig (#1416)
* Fix the checks for dependencies

#1341

* lines

* gnArgs wasn't being added to the build

* echo

* asdfdf

* asdf

* Try >-

* Nope

* Test

* sadfas

* asdf

* got it i think
2020-07-19 12:18:30 +02:00
Matthew Leibowitz 0b3252233b
Re-generate docs 2020-07-14 03:31:23 +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 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 b647079f7b
Add & Run WASM Unit Tests (#1361) 2020-06-29 19:28:12 +02:00
Matthew Leibowitz 975795246f
Add code coverage to the tests 2020-06-25 17:14:30 +02:00
Matthew Leibowitz 5e4c9e170c
Add an API to check the versions 2020-06-24 02:34:30 +02:00
Matthew Leibowitz ef51c565a7
Build it all 2020-06-20 21:01:11 +02:00
Matthew Leibowitz 89a9badaec
sadfasd 2020-06-20 19:43:15 +02:00
Matthew Leibowitz ce67da52e3
Maybe this will work... 2020-06-20 19:18:52 +02:00
Matthew Leibowitz 7b1399f5f8
DataCanBeCreatedFromManagedStream 2020-06-20 19:02:07 +02:00
Matthew Leibowitz 035515783e
that 2020-06-20 18:46:05 +02:00
Matthew Leibowitz ba9fe25e67
Try with data 2020-06-20 18:44:49 +02:00
Matthew Leibowitz f71ce9066e
Try the stream in general 2020-06-20 18:29:48 +02:00
Matthew Leibowitz 535f6fe66a
Try one test at a time 2020-06-20 18:17:20 +02:00
Matthew Leibowitz c23eab0bf9
Add Alpine Native Libraries (#1339)
Building using Alpine 3.9. Tested on Alpine 3.7.
This is both the full libSkiaSharp and the "no dependencies" build.
2020-06-17 19:15:50 +02:00
Matthew Leibowitz 5e10849c89
Do not add the SkiaSharp prefix to dependencies (#1331) 2020-06-11 20:41:29 +02:00
Matthew Leibowitz 69c89d555e
Don't embed libSkiaSharp in the assemblies (#1296)
* Don't embed libSkiaSharp in the dlls
* Update the samples to use the new .targets
* Update forms
2020-06-10 21:03:56 +02:00
Matthew Leibowitz 282638783f
Update Samples (#1313)
* Update samples (new things, AndroidX, updated versions)
* Update icons
* Move away from all obsolete uses
* Temporary workaround for https://developercommunity.visualstudio.com/content/problem/1057547/incorrect-file-validation-for-the-installappleprov.html
* Fix the API diff
2020-06-03 23:30:51 +02:00
Matthew Leibowitz 3af24d9d3a
Allow the path to gn and ninja to be specified (#1300) 2020-05-20 00:54:30 +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 ff30a59f73
Merge remote-tracking branch 'origin/master' into develop 2020-04-30 12:44:44 +02:00
Matthew Leibowitz 258682ed0e
Update docs for release (#1263)
* Update the version numbers
* Regenerate the docs
* Added better change logs
2020-04-30 00:34:12 +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 34b6018ad7
Update all the build tools (#1175)
- Windows builds to use the v14.2 compilers
- Android to use the r19c (min Android 19)
- OpenJDK 13.0.2
- Tizen Studio 3.6
- Build on VS 2019
- Added build args to support preview/any VS installs
2020-03-14 03:24:10 +02:00
Matthew Leibowitz fc9f030a08
A few changes and improvements (#1153)
A few changes and improvements:
- add some helper members
- improved the SKBitmap.CopyTo and related members
- added Encode(...) to SKBitmap
- added Encode(...) with a .NET Stream to SKBitmap, SKImage and SKPixmap
- start the move from SKEncoding to SKTextEncoding
- added more tests
- generator now has a validator for ensuring all declarations have implementations
- added equality members to all structs

Bugs Fixed
- Bitmaps copied with SKBitmap.Copy sometimes have incorrect colors
- The GC would sometimes collect a stream that was being used by a PDF document
2020-02-27 15:12:00 +02:00
Matthew Leibowitz c5fa9aa04e
More Improvements (#1123)
* Make more members readonly (the generator now makes the equality members readonly)
* split the SKMatrix file into SKMatrix44, SKRotationScaleMatrix, SK3dView
* split the SKColorSpace structs/classes into a separate file
* reworked/renamed all the poorly designed SKMatrix (and related) members to be actually useful
* Make sure the obsolete items are invisible
* Make sure everything implements IEquatable<T>
* Update docs and changelogs
* ISKGLViewController is public
2020-02-04 19:00:41 +02:00
Matthew Leibowitz e84ba47396
Upgrade to VS2019 and .NET Core 3.0 (#1030)
* Upgraded a good few things
 - multitargeting for netstandard1.3, netstandard2.0, netcoreapp3.0 and net45
 - iOS, tvOS, macOS, watchOS now builds on non-macOS (not embedded binaries)
 - removed empty assembly infos
 - using Directory.Build.* to clean up a few things
 - improved the msbuild tasks to properly skip
* Add the targets file to the nuget
* Let all the tests run before failing the build
* Pack and validate in one go
* Update the samples to use the new projects
* Use VS 2017 for native builds for now
* Update Dockerfiles
* removed references from Views.WPF to OpenTK #1029 (#1078)
* Install the type redirector
* Update depot_tools
* Don't do any signing for macOS

Co-authored-by: Tyson Williams <34664007+bender2k14@users.noreply.github.com>
2019-12-22 18:50:47 +02:00
Matthew Leibowitz 91e071bf16
Update the docs 2019-12-09 15:40:54 +02:00
Matthew Leibowitz a522264ef8
Update externals.cake 2019-12-08 19:17:04 +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 83ba22c84f
Updated all the samples (#1021)
* Updated all the samples with new things
* Update the docs
2019-11-21 21:26:38 +02:00
Matthew Leibowitz eb05896621
Final tweaks to the docs 2019-11-17 23:51:01 +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
Benedikt Stebner 4d3883b839 Linux build version script to hide exports of dependencies (#984)
* Use a version script for Linux builds to hide third party library exports.
2019-10-17 23:38:46 +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 08785f496a
Build arm64_32 architecture for watchOS (#967) 2019-09-27 06:00:44 +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
Benedikt Schroeder 1b0f3e371c Update HarfBuzz to v2.5.3 (#904)
- Update HarfBuzz to v2.5.3
 - Add UnicodeFunctions SetDelegate
 - Statically linked libstdc++ for Linux
2019-07-13 07:33:15 +02:00