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

210 Коммитов

Автор SHA1 Сообщение Дата
Matthew Leibowitz dabbd7089d
Swap the buffers after a resize (#1668)
Swap the buffers after a resize to get the current buffer to be the new, correct size. Fixes #1377, #914, #722
2021-03-30 17:30:48 +02:00
Matthew Leibowitz 7d20f6fda0
Make sure to properly read image pixels (#1636)
Fixes #1503
2021-03-14 13:46:53 +02:00
Matthew Leibowitz 14bd67945e
Refactor the Android surface factory (#1617)
* Reuse the same backing bitmap logic for Android
* remove the duplicate code
* fix a bug when the view is removed then re-added
* Update samples to net472
2021-02-13 00:03:38 +02:00
Matthew Leibowitz 0e4f6fedd4
Introduce some metal consistency (#1615)
* Use the shortened Mtl in the construcion type names because that is what we have done in the past :'(
* Use the longer Metal in the views layer :')
* Use GRMtlBackendContext as that is coming soon, so might as well get ahead
2021-02-07 13:49:30 +02:00
Harlan Hugh e0e73d6852
Make SKElement.OnRender do nothing if there is no PresentationSource (#1606) 2021-02-04 04:25:04 +02:00
Matthew Leibowitz 29e8f26751 Add Metal APIs for macOS and iOS (#1394) 2021-02-02 14:43:38 +02:00
Matthew Leibowitz 112025bbbe Revert "Add Metal APIs for macOS and iOS (#1394)"
This reverts commit 2a87a0d947.
2021-02-02 14:43:06 +02:00
Matthew Leibowitz 2a87a0d947
Add Metal APIs for macOS and iOS (#1394) 2021-02-02 13:59:41 +02:00
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 74a31ace5c
Update Uno Platform to v3.0 (#1489)
Co-authored-by: Jerome Laban <jerome.laban@nventive.com>
Co-authored-by: Jérôme Laban <jlaban@gmail.com>
2020-10-01 17:56:09 +02:00
Matthew Leibowitz 2d811fb6d1
Update MSBuild.Sdk.Extras (#1511) 2020-09-27 17:28:47 +02:00
Matthew Leibowitz d0562fc3d7
Add a few more GPU debugging members (#1478) 2020-08-25 14:34:58 +02:00
Matthew Leibowitz c0952f9036
Use the version of OpenTK that is correctly sn (#1480)
Fixes #1479
2020-08-25 04:46:29 +02:00
Matthew Leibowitz b87485289c
[UWP] Don't block the UI thread when invalidating (#1468) 2020-08-20 01:54:32 +02:00
Matthew Leibowitz d5d685a580
Add an extensions for SKColorF (#1469) 2020-08-18 02:23:04 +02:00
Matthew Leibowitz b3f5975cd8
Add the GPU views for Uno Platform (#1429)
* Add the GPU views for the platforms
* Add the render loop for the platforms
* Fix the samples for infinite recursion
* Added the GL views to the gallery
2020-07-27 18:46:04 +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 aa6a178701
Instead of asking for the context, find it
Related to #1388
2020-07-08 13:52:51 +02:00
Matthew Leibowitz 39bde0d18a
Explicitly request GL ES 3.x in case we have it (#1388) 2020-07-08 06:45:28 +02:00
Matthew Leibowitz c908d6d71d
Update the version of Clang used to build for Tizen (#1386) 2020-07-07 19:15:40 +02:00
Matthew Leibowitz a5d30e95a6
Build SkiaSharp for Win32 ARM64 (#1358)
* Build SkiaSharp for Win32 ARM64
* Drop net45 so we can use new and more performant things
2020-06-27 02:41:26 +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 98bfa94da7
Improve the GPU APIs (#1294)
* Improve the Vulkan APIs
  - removed the context argument as this is unused as well as an older C/C++ feature
  - added a SharpVk version of the GetProc property.
* Removed the context argument (this is more an older C/C++ feature/requirement)
* Expose the WebGL APIs
* Improve the GRGlInterface and GPU delegates
  - removing the object context for the GPU construction
    - obsoleted GRGlGetProcDelegate in favour of the better named GRGlGetProcedureAddressDelegate
    - renamed GRVkGetProcDelegate to GRVkGetProcedureAddressDelegate
    - use "ProcedureAddress" instead of "Proc" to show that it is the "address" not the actual procedure
  - reworked the GRGlInterface
    - use the new non-context delegates
    - use better naming: Create*
    - adding WebGL
  - created a SharpVk-specific delegate GRSharpVkGetProcedureAddressDelegate
    - use actual types instead of IntPtr
* Reduce the using obsolete warnings
  - still a few left, mainly the colorspace and text blob
* Switch the way GRGlInterface.Create() works
  - first try OpenGL as that is actually what is expected
  - don't explode on an error, return null, like the rest
* Update API usages
2020-05-17 22:11:59 +02:00
Matthew Leibowitz 401cf0336f
Merge 'master' into 'develop' 2020-05-10 17:06:57 +02:00
Matthew Leibowitz 5ea66f2a4a
Performance Improvements (#1277)
* Correct company name
* Fix targets file
* Hide native files from project tree
* Add benchmark project
* Add a feature to skip the object registration
   - ISKSkipObjectRegistration
   - objects implementing this interface will not be registered in the global dictionary
   - major perf boos (2.84x) due to not having to look up in a dictionary
   - use direct constructor instead of object factory
* Throw an exception in "debug" builds
2020-05-10 16:56:12 +02:00
Matthew Leibowitz ff30a59f73
Merge remote-tracking branch 'origin/master' into develop 2020-04-30 12:44:44 +02:00
Matthew Leibowitz 22fcbe7c57
Prevent the GC from collecting "this" and "pixels" (#1258)
* Prevent the GC from collection "this"
* GC.KeepAlive for cases where we only use pixels pointers
2020-04-29 03:51:45 +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 221a96b815
Null out the field when disposing. Fixes #960 (#1256)
Not sure why iOS is drawing a disposed object, but just be safe.
2020-04-28 17:44:08 +02:00
Matthew Leibowitz 2550d14410
[Android.Views] Refresh the surface when recreated (#1234)
Fixes #1232
2020-04-16 18:07:19 +02:00
Matthew Leibowitz 792b9056f3
Release the skia objects when the view is unloaded (#1213)
* Release the skia objects when the view is unloaded

This was originally changed in 8039d0d0bb
for the AngleSwapChainPanel view. But, this was not also extended to include
the skia objects in SKSwapChainPanel.

Nothing needs to be re-created because it is all done in the first paint operation.
2020-04-07 01:03:49 +02:00
Matthew Leibowitz 73bfe55954
Re-work views to avoid incorrect disposal (#1180) 2020-03-24 18:09:38 +02:00
Matthew Leibowitz ee0e668235
Use vcpkg to build ANGLE (#1158)
* Use vcpkg to build ANGLE
* Use a separate step to build ANGLE for now
* Use the new ANGLE constants
2020-03-03 00:09:52 +02:00
Matthew Leibowitz 089c26314a
Before drawing, MakeCurrent (#1141)
Fixes #920
2020-02-12 01:42:24 +02:00
Matthew Leibowitz 148a4d39ad
Prevent double load issue. Fixes #1118 (#1133)
For some reason, some controls (such as the ScrollViewer's LeftHeader, TopHeader, TopLeftHeader) are loaded twice.
We work around this by just adding a counter.
This will also fix any other controls that are a bit weird.
2020-02-09 20:07:55 +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 ea9dd88f76
Fix issues with buffer samples #1087 (#1098) 2020-01-14 04:42: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
Void² a82cecb0e8 Fix broken antialiasing with UWP SKSwapChainPanel (#1086) 2019-12-31 14:03:23 +02:00
Matthew Leibowitz 247569e095
Fix some issues with macOS SKGLView (#1083)
Fixes some of #977
2019-12-28 17:22:23 +02:00
Matthew Leibowitz 2f36be4761
Multi-target SkiaSharp.Views.Windows.Forms (#1082)
Related to #1029
2019-12-27 23:01:05 +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 975b47a913
Don't go straight for the max samples (#1060)
- The max may be 32 which may be too many for some GPUs
- Fixes #1053
2019-12-13 07:26:37 +02:00
Matthew Leibowitz a6a514c71d
Improve stability of UWP GPU View (#1024) 2019-11-21 05:00:56 +02:00
Matthew Leibowitz b1c0681e32
Correction of #879 (#1022) 2019-11-20 06:36:53 +02:00
Matthew Leibowitz cd257ad48f
Free memory when the view is detached. Fixes #1004 (#1005) 2019-11-12 00:51:42 +02:00
Matthew Leibowitz ec5f04fea1
Update Xamarin.Forms (#916)
- so we can update OpenTK
- so we can add WPF and GTK
2019-07-23 14:19:25 +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 ce09f74fc1
Fix implementation of the iOS canvas (#879) 2019-06-24 10:55:42 +02:00
Odirb 25a78800e6 Fix #849 : function ToSKPixmap create display artifacts with transparent bitmaps (#863) 2019-06-24 03:36:53 +02:00