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

803 Коммитов

Автор SHA1 Сообщение Дата
Benedikt Stebner 8a7e913dcc Add int unicode overloads to be more consistent (#972) 2019-10-24 14:57:48 -04: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
Benedikt Stebner 9d3d4f577f HarfBuzzSharp 2.6.1 (#929)
* Add hb_ot_metrics
* Add int codepoint overloads
* It appears that the update of harfbuzz resulted in a 0.125 to the left
2019-09-28 16:18:59 +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 d761ec6eb4
Add *.dylib to the app bundle when using the full fx (#919)
Fixes #913
2019-07-26 20:22:43 +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
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
Benedikt Schroeder 82815f8aa7 [HarfBuzzSharp] font funcs (#881)
* Initial implementation of font funcs
* Add a method to reduce verbosity for multi-delegates
* Add missing unit tests
* Remove the concept of "user data"
 - this is not really useful to C# and delegates
 - it adds complexity
* Remove context from delegates
* Implement UserDataDelegate
* Add the calling convention to the delegates.
* Moved some files around and improved tests
 - moved the font functions interop into a new file to help separate logic from interop (helpful for wasm)
 - added the various interop and [MarshalAs] attributes for Windows
 - reworked the interop api tests to include the harfbuzz apis
 - the font name delegates now use strings
 - removed single line if braces to reduce code
* Throw correct extensions
* Face can now also use the UserDataDelegate
2019-06-27 20:06:55 +02:00
Matthew Leibowitz b00169a6cf
Add a helper method for multi delegates 2019-06-26 13:56:33 +02:00
Matthew Leibowitz 66e7ac6ebb
Use Span<T> for data, bitmap data and text blobs (#865)
* Add several overloads that take ReadOnlySpan<byte>
* Update to System.Memory 4.5.3
* Made a few tweaks to the text blob
 - copy using new Span<T> CopyTo method
 - split runbuffers out into their own file
* Add Span<T> overloads for the blob allocations
2019-06-26 12:56:14 +02:00
Matthew Leibowitz 146fcb3aa4
Add a method to reduce verbosity for multi-delegates (#882) 2019-06-26 01:11:29 +02:00
Matthew Leibowitz e28cce8ab4
Upgrade the macOS bots and software (#884)
* Upgrade the macOS bots and software
* Remove the System.Memory NuGet for the mobile platforms (Android, macOS, iOS, watchOS, tvOS)
 - mono 5.18 includes this internally
 - results in https://github.com/xamarin/xamarin-macios/issues/5687
 - related to https://github.com/mono/SkiaSharp/pull/884
2019-06-26 01:11:01 +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 6e96ba6ee5
Improve the delegate proxies (#878)
* Improve the delegate proxies
* Replace the dictionary-based proxy delegates
* Use fields and inlining
2019-06-24 11:18:11 +02:00
Matthew Leibowitz 650f2e43f7
Update some versions and fix the sample builds (#869)
- Xamarin.Forms is now the last v3.x (v3.6)
 - Build using the latest Android (v9.0)
 - Update UWP samples so they can build again
2019-06-21 02:20:42 +02:00
Matthew Leibowitz fb51b90761
[harfbuzz] Allow loading face by table data (#862)
* Add hb_face_create_for_tables support

* Fix net core build

* Make sure blobs are reused

* Support cleanup for TableLoader

* Remove extension

* Fix dispose handler and add unit test

* Rework unit tests to reduce file access

* Keep delegate alive

* Improve font usage in unit tests

* Support for iOS

* Remove typeface extension

* Cleanup

* Add unit test

* update the docs before re-gen

* A few tweaks:
 - use Parse instead of FromString
 - create a "static" Blob type
 - remove default param values
 - fix tests namespaces and base tests

* More changes:
 - unified the destroy delegates
 - NativeDelegateContext now supports multiple delegates and contexts for a single pointer
 - public Face delegates no longer use pointers

* Reuse the code

* Added lower-level members to SKTypeface
 - get the table data without copying to array
 - added some TryXXX to avoid exceptions

* Revert parameter name change

* The empty Face is a static face that cannot be disposed

* Make sure to return the same managed instance

* Remove the duplicate iOS build run
2019-06-18 16:33:10 +02:00
Matthew Leibowitz 35a11d705f
Added some members to Blob 2019-03-29 07:45:47 +02:00
Matthew Leibowitz c88c7c9cdc
A few final tweaks 2019-03-29 07:33:44 +02:00
Matthew Leibowitz 915ca1746a
Made a few tweaks to better fit the "style"
- converted default arguments into overloads
 - fixed a few whitespaces in unchanged files
 - updated all the projects to C# 7.3
 - the Buffer propertes are now arrays again, but added methods for the spans
    - reduce breaking changes
    - the values can be broken if the buffer changes, so use a better named method
 - removed the new Point type
    - don't want to add another point type to the world
    - will use the .net standard 2.0 Point type when we upgrade
    - the Font.Scale property is removed for now, but we will add it back with the drawing point type
 - the Font GetAdvances are now returning arrays
    - the spans were not necessary as the type is an explicit array
 - changed the casing of the various script properties
2019-03-29 00:39:10 +02:00
Benedikt Schroeder 4018d103c0 Fix hb_font get glyph advances 2019-03-21 19:24:45 +01:00
Benedikt Schroeder 460b0139b1 Fix net standard build 2019-03-21 17:09:40 +01:00
Benedikt Schroeder c1549d9238 Add Blob FromFile FromStream
Add Face Tables
2019-03-21 15:22:02 +01:00
Benedikt Schroeder 772d3324c8 Merge branch 'harfbuzzUpdate' of https://github.com/Gillibald/SkiaSharp into harfbuzzUpdate 2019-03-17 20:02:57 +01:00
Benedikt Schroeder 84105c5e2b Add font features 2019-03-17 20:02:45 +01:00
Benedikt Schroeder eb5abffe37
Merge branch 'master' into harfbuzzUpdate 2019-03-15 14:09:39 +01:00
Benedikt Schroeder f6eb0e03ce Merge branch 'harfbuzzUpdate' of https://github.com/Gillibald/SkiaSharp into harfbuzzUpdate 2019-03-14 10:55:15 +01:00
Benedikt Schroeder 1f9d323bd0 Add equals overloads 2019-03-14 10:55:03 +01:00
Benedikt Schroeder dff5e0e146
Merge branch 'master' into harfbuzzUpdate 2019-03-13 20:20:30 +01:00
Benedikt Schroeder 7a8203fe67 Prevent default, empty unicode funcs from getting destroyed 2019-03-13 20:18:12 +01:00
Matthew Leibowitz 6103048e6c
Merge pr/788 into master 2019-03-13 05:24:11 +02:00
Matthew Leibowitz 064e97607d
Merging pr/788 2019-03-13 05:19:46 +02:00
Dariusz Komosiński 5b9e08d824 Add Reset method to SKPaint, add constructor to SKMatrix 2019-03-09 20:49:25 +01:00
Benedikt Schroeder 02a82700ea Code style 2019-03-09 11:28:05 +01:00
Benedikt Schroeder b0671833af Avoid using PtrToStructure and instead use ReadOnlySpan 2019-03-08 17:16:08 +01:00
Benedikt Schroeder cb6b6f855e Fix NetCore tests 2019-03-05 11:02:24 +01:00
Benedikt Schroeder d678134cf5 Add unicode funcs 2019-03-01 15:43:18 +01:00
Benedikt Schroeder ed605cfbe9 Add unicode funcs 2019-02-28 18:47:26 +01:00
Benedikt Schroeder 3bb20b251e Add face tests 2019-02-27 15:51:34 +01:00
Benedikt Schroeder 4bca10b235 Fix some minor issues
Add more API's to Buffer
2019-02-27 08:58:36 +01:00
Benedikt Schroeder 1588e472f3 Add more tests 2019-02-25 15:58:52 +01:00
Benedikt Schroeder eccaded515 Add NDEBUG
Add more exceptions
2019-02-24 18:22:20 +01:00
vexx32 bf4c54afc6 ♻️ Update SKRegion constructors and methods
 Add new methods and ctors for path shenanigans
♻️ Make SetPath(SKPath p) more reliable, hopefully
2019-02-21 21:22:58 -05:00
Benedikt Schroeder 686ac11da0 Minor debugging improvements 2019-02-21 16:55:12 +01:00
Benedikt Schroeder eb1a0e60aa Add initial unit tests
Replace uint with int to better fit into the .Net world.
2019-02-19 16:18:08 +01:00
Benedikt Schroeder f8ee907cd4 Merge branch 'harfbuzzUpdate' of https://github.com/Gillibald/SkiaSharp into harfbuzzUpdate 2019-02-05 16:32:55 +01:00
Benedikt Schroeder ef0c5a58a4 Simplify Tag and Script usage 2019-02-05 16:32:49 +01:00
Matthew Leibowitz 8ebdc9a856
Merge branch 'master' into harfbuzzUpdate 2019-02-05 05:27:32 +02:00
Benedikt Schroeder 4abce80d95 Add netstandard reference to mac mobile builds 2019-02-01 10:35:25 +01:00
Benedikt Schroeder 85d6d33dc6 Refactor Script to support better debugging 2019-01-31 09:50:00 +01:00
Matthew Leibowitz 2d86b5ed04
Fixed the SKRectI overload for SKRegion.Intersects
- fixes https://github.com/mono/SkiaSharp/issues/770
2019-01-31 05:31:16 +02:00
Benedikt Schroeder dd88bc663b Remove C# 7.3 usage in project files 2019-01-29 19:42:56 +01:00
Benedikt Schroeder ec5e186dc5 Remove use of Span<T> 2019-01-29 19:37:00 +01:00
Benedikt Schroeder 612844df71 SerializeGlyphs fixes 2019-01-21 10:14:18 +01:00
Benedikt Schroeder f556be70bb
Merge branch 'master' into harfbuzzUpdate 2019-01-20 18:05:38 +01:00
Benedikt Schroeder 9206f17aed HarfBuzz binding additions
Disable fastFail
2019-01-20 18:02:08 +01:00
Matthew Leibowitz 276e7ca13b
UWP also requires the platform NuGet 2019-01-16 17:55:24 +02:00
Matthew Leibowitz 2ce378e492
The new 2.x MSBuild.Sdk.Extras do not work without the custom SDK 2019-01-16 04:46:27 +02:00
Matthew Leibowitz ff8c2b9f4b
Reverting the project SDK type as this is not yet supported on mac 2019-01-15 22:39:14 +02:00
Matthew Leibowitz 15bacd97ab
Merging development into SkDrawable
- added some basic tests
 - added the xamarin files to the mac projects
 - merged the native skia branches
2018-12-27 00:04:49 +02:00
Matthew Leibowitz ae6350966e
Merging development into SkDrawable
- added some basic tests
 - added the xamarin files to the mac projects
 - merged the native skia branches
2018-12-26 23:54:48 +02:00
Matthew Leibowitz dbfa791d67
Update mdoc and move into the .targets file 2018-12-23 15:21:26 +02:00
Charlenni 6ff9b758e9 Changed name for creating a new picture snapshot to Snapshot() and the corresponding delegate to OnSnapshot() 2018-12-23 12:21:53 +01:00
Charlenni 546add4889 Changed return type of NewPictureSnapshot from SKPicture to IntPtr
Changed some typos
Changed function name NewPictureSnapshot() to ToPicture()
2018-12-21 21:38:57 +01:00
Matthew Leibowitz ad21a4455d
Updated the projects
- Use the latest version of MSBuild.Sdk.Extras
 - No longer use MSBuild.Sdk.Extras for the net and netstandard monikers as the new .NET Core already supports these nicely
 - Update all the Android projects to be 4.4+ as below is no longer realistically supported - both by Xamarin and Google
 - Using the Sdk attribute to specify the new project SDK
2018-12-21 01:39:48 +02:00
Charlenni 3abc2a59ed Removed SKAbstractDrawable
Added SKPictureRecorder.EndRecordingAsDrawable()
2018-12-20 21:35:12 +01:00
Charlenni 00b8017755 Merged master 2018-12-20 15:14:33 +01:00
Charlenni 955c7e735f Added some memory management 2018-12-20 15:07:08 +01:00
Charlenni e1c0178a62 Removed some bugs 2018-12-20 14:26:10 +01:00
Charlenni d60e7fafa0 Added bounds at function OnGetBounds as reference 2018-12-19 18:54:10 +01:00
Matthew Leibowitz edba9a6607
Fixed and enhanced the SKColorSpace API 2018-12-18 08:44:49 +02:00
Matthew Leibowitz 22032a69ab
Support the case of measuring empty strings. Fixes #734
- previous logic: did not check for nulls, the update did
 - new logic: still check for nulls, but now only if we have indicated that there _should_ be text (there is a length)
 - added overloads for text pointers that accept an int as opposed to just an IntPtr
2018-12-17 23:50:29 +02:00
Charlenni 1e64da634d Add SkDrawable 2018-12-14 12:07:16 +01:00
Matthew Leibowitz 4a117f0bdf
The DPI constant should be in SKDocument 2018-12-02 04:10:20 +02:00
Matthew Leibowitz 121ab0496c
Fixed the matrix interop 2018-12-02 03:54:36 +02:00
Matthew Leibowitz 0cf1c6d293
Fixing the bitmap resize/scale methods
- consistency
    - `Resize` is for methods that create new objects
    - `ScalePixels` is for mthods that COPY pixels INTO a provided object
 - uniformity
    - all 3 imageing types have pixel scaling capabilities
 - improved obsolete desriptions
 - added new methods instead of just obsoleting
 - added more tests
2018-11-29 19:26:57 +02:00
Matthew Leibowitz 6c7f018724
More improvements for image decoding:
- SKCodec can now decode more imputs (bytes, streams)
 - SKImage no longer unnecessarily copies image data all over when decoding
 - SKBitmap no longer copies data unnecessarily
2018-11-27 23:46:12 +02:00
Matthew Leibowitz 51adc3c1b2
Non-ASCII Paths Fixes
- A bunch of changes to no longer wrpa a managed stream for non-ASCII paths on Windows
 - All paths are now converted to a UTF-8 path before been shipped over to native code
 - Fixes #697
2018-11-25 01:57:16 +02:00
Matthew Leibowitz d814a432ee
Handle the case where the file does not exist
- return null instead of just crashing in native code
 - fixes #618
 - fixes #677
2018-11-23 20:36:46 +02:00
Matthew Leibowitz e243c2a7f3
Updated the docs 2018-11-19 19:39:13 +02:00
Matthew Leibowitz a2f2d35609
Enhanced the PDF/XPS implementation and features 2018-11-17 00:55:17 +02:00
Matthew Leibowitz ca5eb3a70a
Moved the points, sizes and rects into a new file 2018-11-15 06:27:34 +02:00
Matthew Leibowitz 6a6e94af40
Add bindings for SKTextBlob, SKTextBlobBuilder and other text APIs 2018-11-15 04:27:17 +02:00
Matthew Leibowitz e7262adbcb
Renamed `GetMaxSurfaceSampleCountForColorType` to remove the redundant suffix 2018-11-13 22:45:39 +02:00
Matthew Leibowitz d2011ddc60
Updated the docs to match the API 2018-11-12 12:14:12 +02:00
Matthew Leibowitz 69357ab5d1
A few tweaks to the API to remove unnecessary changes 2018-11-11 03:48:53 +02:00
Matthew Leibowitz 53fbd5509f
Making the C layer dumber
- no "clever" mapping from types, just cast
 - removing variables, just use a direct call
 - sk_imageinfo_t still requires mapping because of the sk_sp<T> must be mapped to a T*
 - sksurfaceprops_t is now a class
2018-11-10 22:39:32 +02:00
Matthew Leibowitz b30b0ab56f
Some improvements to the code
- use "real" types instead of just IntPtr in the interop layer to make things easier to read
 - using some new C# features
 - corrected the use of the "fixed" keyword to no longer require arrays to have elements
2018-11-09 01:26:10 +02:00
Matthew Leibowitz 783bb1d069
Fix whitespaces before major overhaul 2018-11-09 00:16:56 +02:00
Matthew Leibowitz 1f929695f6
Added a "trim" path effect 2018-11-06 19:37:10 +02:00
Matthew Leibowitz 66bd030f70
Added some utility methods to SKPath. Closes #669 2018-11-02 04:00:41 +02:00
Matthew Leibowitz 8f9975a722
Added a few overloads to SKImage
- FromEncodedData now can decode streams, buffers and files
 - FromPixelCopy now can copy from streams and buffers
2018-11-02 01:52:08 +02:00
Matthew Leibowitz 83e0941cb0
Added the rest of the sweep gradient shader arguments
- Closes #656
2018-10-29 22:19:44 +02:00
Matthew Leibowitz efc709437f
SKPixelSerializer is actually removed, but we go obsolete 2018-10-12 03:22:53 +02:00
Matthew Leibowitz 660b7c0cb5
This was accidentally added 2018-10-12 03:21:49 +02:00
Matthew Leibowitz c5296fa75d
We must try not to break everything after Google's rename 2018-10-04 15:37:44 +02:00
Matthew Leibowitz 102d6477f6
Renamed the extension method to be both more specific and more accurate 2018-10-04 02:49:03 +02:00
Matthew Leibowitz 66b8b479db
Made things nicer still 2018-10-03 02:16:51 +02:00
Matthew Leibowitz 929945ef40
Improved the API a bit 2018-10-03 00:15:49 +02:00
Matthew Leibowitz 35d3f00f55
Exposed SKTypeface.CreateDefault() and SKTypeface.Default to C# 2018-09-28 20:57:43 +02:00
Matthew Leibowitz aa0ce80fb6
The subset is still invalid 2018-09-28 16:02:57 +02:00
Matthew Leibowitz 8332c99ec1
Correctly marshal the inner struct 2018-09-27 15:13:25 +02:00
Matthew Leibowitz 63b2dfc3a2
If there are no glyphs, don't try and read them. Fixes #630 2018-09-26 07:03:18 +02:00
Matthew Leibowitz a27cbb1eae
Improve the Linux CI (#635)
* Prepare the bits to build the linux platforms
* Adding just the required native packages
* Update mdoc and add the --quiet flag to reduce output noise
* Moved the linux native assets into a separate nuget
* Updated the UWP signing key
* Remove the old index8 members
2018-09-17 04:48:12 +02:00
Matthew Leibowitz 3473c45954
SKStream readXXX now return bool and have an out parameter for the value 2018-09-04 21:58:34 +02:00
Matthew Leibowitz e43a90af42
Make sure to preserve the color type 2018-09-03 14:28:02 +02:00
Matthew Leibowitz 718f2ffab6
Remove the version number form the base win RID #599
- Windows 7 is the minimum version anyway, so this does not really matter
2018-08-15 21:06:03 +02:00
Matthew Leibowitz 3f320a1a60
Merge remote-tracking branch 'origin/master' into development 2018-08-09 03:56:01 +02:00
Matthew Leibowitz 319f127875
Tizen will include all the RIDs by default, so work around this 2018-08-09 02:00:42 +02:00
Matthew Leibowitz 2f9adbceba
Update mdoc 2018-08-07 23:33:39 +02:00
Matthew Leibowitz 67057ca2b3
The merge went south... 2018-08-06 22:53:05 +02:00
Matthew Leibowitz 092b5e0a6d
Merge remote-tracking branch 'origin/master' into development
# Conflicts:
#	source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Native.Shared/SKCanvasViewRendererBase.cs
2018-08-06 22:47:10 +02:00
Wonyoung Choi eed6c2f224 Fix target files for Tizen to use TizenTPKFiles
Current temprary hacks for tizen-x86 RID are still needed because the Tizen 4.0 platform
including .NETCore 2.0 does not understand the tizen-x86 RID.

In this changes, Use TizenTPKFiles defined in Tizen.NET.Sdk instead of Link and CopyToOutputDirectory
to solve following problems.
- The linked file (runtime/linux-x86/native/foo.so) is displayed in VS Project tree.
- The linked file is always copied to tpkroot/bin even when RID is specified.
- The linked file can't be excluded using the file excluding features of Tizen.NET.Sdk.
2018-07-30 10:28:57 +09:00
Matthew Leibowitz d9e3ac2c8b
Remove the extra backslash after %(RecursiveDir)
- it is technically incorrect as the recursive directory already has the trailing slash
 - it breaks on mac as vs for mac is more strict/sensitive
2018-07-23 23:43:28 +02:00
Matthew Leibowitz c073697bb0
Added the HEIF to the encoded enum
- commented out as it appears to still be in dev
2018-07-22 01:04:40 +02:00
Matthew Leibowitz 30c119ae9e
marking everything with color tables as obsolete
- this is now a private api
 - may be removed at any time
2018-07-21 22:51:30 +02:00
Matthew Leibowitz 04883d0fb6
Added bindings for SkOverdrawCanvas
- also set flags to reduce file sizes
2018-07-21 22:35:05 +02:00
Matthew Leibowitz 084e53e47f
First check to see if the index is in range 2018-07-21 03:17:33 +02:00
Matthew Leibowitz 6814514573
Matching fonts from an existing typeface will be going away and it is not working on all platforms 2018-07-21 03:17:11 +02:00
Matthew Leibowitz 8dc9af4255
The default value for SKCodecOptions.PriorFrame = -1 2018-07-18 18:15:00 +02:00
Matthew Leibowitz cc40c294ef
Create out own __TIZEN__ define
- things appear to have changed from TIZEN4_0 to TIZEN40
 - we don't want the version in the define
2018-07-18 02:53:15 +02:00
Matthew Leibowitz b7efe03d58
Update all the versions to the latest of everything 2018-07-18 02:52:19 +02:00
Matthew Leibowitz b7eed6a312
make sure the encoding is correct 2018-07-12 16:59:13 +02:00
Matthew Leibowitz 278dab9358
Make sure we create PDB files for debugging and testing 2018-07-12 16:58:28 +02:00
Matthew Leibowitz 5486cefa55
Added back some members that we can still support 2018-07-12 16:58:02 +02:00
Matthew Leibowitz 15f1263fc7
Updating the binding members and types 2018-07-12 13:30:18 +02:00
Matthew Leibowitz f2a51f8ae9
The managed SkiaSharp now builds again. 2018-07-08 00:12:16 +02:00
Matthew Leibowitz 7f35c022d5
Move the GPU definitions into a new file 2018-07-07 19:10:02 +02:00
Matthew Leibowitz f0bc5660e5
Removing the incorrect headers and setting the encoding 2018-07-06 18:21:40 +02:00
Matthew Leibowitz 2bd9433621
Use the correct delegate. Fixes #547 2018-06-08 10:28:50 -07:00
Matthew Leibowitz 90bc92597e
Be more descriptive with the filter flags 2018-05-31 19:17:15 +02:00
Matthew Leibowitz 8cccf5c4ff
incorrect visibility 2018-05-31 17:13:34 +02:00
Matthew Leibowitz ff838ceccb
Added bindings for SKRoundRect 2018-05-29 03:43:29 +02:00
Matthew Leibowitz bae73b457b
Added some overloads to improve lives 2018-05-26 17:01:17 +02:00
Matthew Leibowitz 7a4b1e6054
Merge pull request #529 from mono/dev/nway-canvas
Bindings for SKNWayCanvas and SKNoDrawCanvas
2018-05-25 21:42:18 +02:00
Matthew Leibowitz a87713b422
Add more encoding options to SKPixmap 2018-05-25 01:42:59 +02:00
Matthew Leibowitz b0ddea825a
Revert "Add more encoding options to SKPixmap"
This reverts commit 1cd83d58e5.
2018-05-25 01:42:19 +02:00
Matthew Leibowitz 1cd83d58e5
Add more encoding options to SKPixmap 2018-05-25 01:41:33 +02:00
Matthew Leibowitz 865f94f0f8
Merge branch 'master' into dev/nway-canvas 2018-05-24 20:38:37 +02:00
Matthew Leibowitz d9b53a2b92
No wildcards just yet... #457 2018-05-24 20:25:09 +02:00
Matthew Leibowitz faa4095802
Adding bindings for SKNWayCanvas and SKNoDrawCanvas
Fixes #457
2018-05-24 19:12:09 +02:00
Matthew Leibowitz 5475b7e051
We don't need to be fancy. 2018-05-23 01:17:09 +02:00
Matthew Leibowitz 1deb7d9180
Removing shared projects from the source 2018-05-23 00:38:01 +02:00
Matthew Leibowitz d38573a6f7
Merge branch 'master' into dev/sdk-style-project 2018-05-22 04:39:59 +02:00
Matthew Leibowitz 9fc88f0a70
Added a new .editorconfig
- and removed a comment from a .csproj
2018-05-17 04:11:32 +02:00
Matthew Leibowitz 6c05bf00af
Added some better .editorconfig files 2018-05-12 22:13:44 +02:00
Matthew Leibowitz 88a573f133
Update the rest of the projects to the SDK-style projects 2018-05-11 03:59:30 +02:00
Matthew Leibowitz b481d3821f
Don't copy native files if asked not to do so 2018-05-10 16:18:57 +02:00
Matthew Leibowitz 58b4dfdcd8
The wrong file... 2018-05-10 14:54:40 +02:00
Matthew Leibowitz df4904b840
Updated all the HarfBuzzSharp projects 2018-05-10 07:51:11 +02:00
Matthew Leibowitz 96448a09d2
Updated all the SkiaSharp projects 2018-05-10 07:10:48 +02:00
Matthew Leibowitz b2751a6521
Starting the work to get SDK-style projects into the system 2018-05-10 06:54:48 +02:00
Matthew Leibowitz f46d9ce0ae
Some changes that were reverted, breaking the code 2018-05-06 20:05:36 +02:00
Matthew Leibowitz 82cafbece2
Properly copy bitmaps. Fixes #497 2018-05-06 02:57:13 +02:00
Matthew Leibowitz ec909a01a3
Case sensitive paths for linux 2018-05-03 03:17:20 +02:00
Matthew Leibowitz 0a0560a511
HACK: Added a .targets file for tizen-x86 2018-05-01 23:00:53 +02:00
Matthew Leibowitz 9d4f672584
Moved the Tizen GL init to the core SkiaSharp library 2018-05-01 20:32:00 +02:00
Matthew Leibowitz 5e6c998241
Updated mdoc to the latest 2018-04-19 21:10:52 +02:00
Matthew Leibowitz d261379027
Merge branch 'master' into dev/add-tizen-support 2018-04-17 22:35:30 +02:00
Matthew Leibowitz 042ae7dab3
Made some changes to improve the overall build process
- this includes the Tizen bits from the PR
 - the config.h for harfbuzz is no longer from the repo, but an actual config
 - added a basic Tizen-only sample
 - SkiaSharp.HarfBuzz.NetStandard and SkiaSharp.views.Forms.NetStandard should have died long time ago
2018-04-17 22:14:02 +02:00
Matthew Leibowitz 0b38873fee
Fixed a case where exceptions were thrown in the constructors. Fixes #482
- only dispose the list if the list was actually created
 - sign the tests so we can use InternalsVisibleTo
 - added a test to identify #482
2018-04-12 19:35:36 +02:00
Hobum (Vincent) Kwon 5bc9650021 Fix SKGLSurficeView upside down issue for Tizen backend 2018-04-03 14:31:17 +09:00
Hobum (Vincent) Kwon f1429acbb4 Remove building_for_tizen 2018-04-02 19:38:58 +09:00
Hobum (Vincent) Kwon cfd8d476cc Add Xamarin.Forms for Tizen support 2018-04-01 22:35:30 +09:00
Matthew Leibowitz 71498535d5
Fixed a bug when either the XPS or PDF is not supported 2018-03-24 03:18:41 +02:00
Matthew Leibowitz a3f35901b9
Merge branch 'master' into dev/somewhat-modern 2018-03-24 02:38:48 +02:00
Matthew Leibowitz d3a54285a8
Some platforms require COM to be initialized Fixes #463
- create a helper class
 - used primarily for XPS
2018-03-24 00:13:34 +02:00
Matthew Leibowitz fcafca3072
Using the shiny new mdoc (v5.6.0) 2018-03-23 06:37:31 +02:00
Matthew Leibowitz 9180933aa0
Fixes for macOS 2018-03-22 05:11:20 +02:00
Matthew Leibowitz d9c12d5b29
Everything now builds again on Windows 2018-03-22 03:12:17 +02:00
Matthew Leibowitz 6c25780a6b
Moving more work into MSBuild 2018-03-20 05:01:37 +02:00
Matthew Leibowitz 6484936159
Applying some of the modernization:
- libSkiaSharp is now built using GN/Ninja for Android/Linux/UWP/Windows
 - all native source code lives in mono/skia
2018-03-19 23:08:30 +02:00
Matthew Leibowitz 6dbbdea5a3 Using an internal MonoPInvokeCallbackAttribute 2018-02-16 16:52:30 +02:00
Matthew Leibowitz 842ce1a0db Don't force building with .net standard library 1.6.0 2018-02-09 23:27:40 +02:00
Matthew Leibowitz eb629db98b Added SKImage.IsLazyGenerated to help with cases like #445 2018-02-08 15:04:59 +02:00
Matthew Leibowitz 5c5c505e68 Added an overload to SKSwizzle 2018-02-08 13:59:21 +02:00
Matthew Leibowitz b04f9cabc9 Created an abstract, writeable, managed stream 2018-02-06 19:12:44 +02:00
Matthew Leibowitz 88aa6ab08d Return null if the file does not exist when opening a stream 2018-02-05 17:31:09 +02:00
Matthew Leibowitz 9a0bff839b Make sure that we do dispose the streams. #422 2018-02-02 17:46:25 +02:00
Matthew Leibowitz 12cfd60f1a Avoid passing unicode paths to native code as it doesn't support non-ASCII characters on Windows. Fixes #390 2018-02-02 01:12:07 +02:00
Matthew Leibowitz f294636b9c Close document streams. Fixes #422 2018-02-02 00:23:53 +02:00
Matthew Leibowitz 06bef73cfe removing obsolete types and members 2018-01-31 23:30:28 +02:00
Matthew Leibowitz 853c222dc7 Updating NuGet dependencies 2018-01-31 05:13:26 +02:00
Matthew Leibowitz cdabd53d9e Fix the casing for linux 2018-01-30 17:50:18 +02:00
Matthew Leibowitz 3103ee9662 Make sure to copy linux native files around 2018-01-24 21:04:35 +02:00
Matthew Leibowitz cdeb6b67ec Improved the means for creating surfaces around textures. #413 2018-01-13 17:19:18 +02:00
Matthew Leibowitz b601851ca1 Improvements to the unsafe code 2018-01-13 17:15:33 +02:00
Matthew Leibowitz 812b9ab8dc Merge commit 'master' into dev/v1.60.0 2017-12-20 01:53:31 +02:00
Matthew Leibowitz 2f86d008f6 Corrected the implementation of SKPaint.BreakText
- Fixes #381
 - Breaking change:
    - BreakText(string) returns the number of characters
    - BreakText(byte[]) returns the number of bytes
2017-12-19 23:57:49 +02:00
Matthew Leibowitz a58f62bfc9 Using a better front buffered stream 2017-12-17 22:19:42 +02:00
Matthew Leibowitz aab51650ac abstracted the managed stream for arbitary streams 2017-12-17 17:54:43 +02:00
Matthew Leibowitz 987c909a4b Added SKStream.Peek() 2017-12-14 07:30:27 +02:00
Matthew Leibowitz 848eb5fbd7 Update to v1.59.3 2017-12-07 01:24:48 +02:00
Matthew Leibowitz 53a8c4d425 SK3dView does not appear to be going away 2017-12-07 01:22:25 +02:00
Matthew Leibowitz e7778882cd Use the native drawBitmapNine and drawImageNine methods. Fixes #395 2017-11-30 09:59:22 +02:00
Matthew Leibowitz 8ddb0f6668 Added a member to swizzle the R and B 2017-11-03 00:11:32 +02:00
Matthew Leibowitz 59128dd87e Merge branch 'master' into dev/v1.60.0 2017-10-27 12:38:38 +02:00
Matthew Leibowitz 4106505ab0 SKManagedStream Memory Fixes (#386)
Fixed the memory management of a `SKManagedStream` - especially when used with a `SKTypeface`.
2017-10-25 16:29:51 +02:00
Matthew Leibowitz 6920c9390d Make sure we can create a typeface from non-seekable streams 2017-10-03 22:29:18 +02:00