Comments (6)
And that is working as you can see! :)
from skiasharp.
Work being done in #81
from skiasharp.
Why not use dlsym
/GetProcAddress
and Marshal.GetDelegateFromFunctionPtr
instead of DllImport
? That will add a lot of flexibility in native library location like looking for correct CPU arch version in libSkiaSharp-x86.dll or libSkiaSharp-x64.dll depending on current platform.
Something like that (MIT-licensed):
https://github.com/kekekeks/evhttp-sharp/blob/master/EvHttpSharp/Interop/LinuxLoader.cs
https://github.com/kekekeks/evhttp-sharp/blob/master/EvHttpSharp/Interop/OsxLoader.cs
https://github.com/kekekeks/evhttp-sharp/blob/master/EvHttpSharp/Interop/Win32Loader.cs
https://github.com/kekekeks/evhttp-sharp/blob/master/EvHttpSharp/Interop/Event.cs (usage)
from skiasharp.
The only issue that I see is iOS static linker, but I think that a custom dlsym (skiasharp_dlsym
or something) could be implemented in the native code. We did it this way in our old skia-based backend in avalonia(aka perspex) and it worked quite well.
from skiasharp.
Are there any instruction on how this was achieved. I want to run SkiaSharp on native Linux but intel.
from skiasharp.
@jameswalmsley I just use a default name of libSkiaSharp.[a/dll/so/dylib]
I do this in the https://github.com/mono/SkiaSharp/blob/v1.53.0/binding/Binding/SkiaApi.cs#L48-L62
You should be able to just #if __LINUX__
or something. But, it should also fall back to the default "libSkiaSharp"
and the mono runtime will automatically select the correct extension on the platform.
from skiasharp.
Related Issues (20)
- [BUG] Text Missing When Running From AWS Lambda HOT 3
- [BUG] SkiaSharp 3.0 Preview 3.1 crashes the release version of the .NET MAUI app at start, debug works fine HOT 9
- [BUG] Drawing is warped during window resize on NVIDIA graphics card
- Canvas Info shows huge size when using Chrome Debugger and using Device Emulation
- [BUG] Build outputs duplicate native libraries HOT 2
- Skia Blazor Runs in debugger but not when deployed
- [BUG] SKGLElement gives black screen on Intel integrated graphics
- [BUG] SKGLView on .NET MAUI is missing a handler (the return) HOT 6
- [BUG] On iOS, with .NET 9.0 Preview 2 and 3 and SkiaSharp 3.0 Preview 2.1 / 3.1, SKGLView corrupts SkiaSharp memory and stops SkiaSharp from functioning HOT 7
- [BUG] The position draw on SKXamCanvas is not correct. #1585 Was this a bug that you worked around? HOT 3
- [PERFORMANCE] On iOS, layout speed of pages with SKGLView is slow, making layout wobbly at start (SKCanvasView is instantaneous)
- [BUG] SkiaSharp 2.88.8 (Xamarin) crashes randomly with Mali GPUs HOT 4
- [BUG] SKPaint's IsAntiAlisasing is on on Android but off on iOS by default (Xamarin / SkiaSharp 2.88.8) HOT 1
- [BUG] SkiaSharp crashes in WebAssembly if building with non-Release/Debug build config HOT 1
- [BUG] Canvas.DrawPath Cause Memory Leak on Windows 11 HOT 1
- [BUG] SKBitmap.ColorSpace is always null. Unable to check for CMYK, RGB, etc. HOT 1
- [BUG] CR2 image orientation being detected incorrectly.
- [BUG] Decoding fails with tif files
- [BUG] <title>2.80.3 Excellent performance 300+FPS, 2.88.8 poor performance 30+FPS HOT 1
- [BUG] Horizontal lines disappear when zoomed in HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skiasharp.