Comments (3)
To do this, I had a look and put together SKManagedStream
:
Managed bit: https://github.com/mono/SkiaSharp/blob/master/binding/Binding/SKManagedStream.cs
C Header: https://github.com/mono/SkiaSharp/blob/master/native-builds/src/sk_managedstream.h
C Source: https://github.com/mono/SkiaSharp/blob/master/native-builds/src/sk_managedstream.cpp
C++ Header: https://github.com/mono/SkiaSharp/blob/master/native-builds/src/SkManagedStream.h
C++ Source: https://github.com/mono/SkiaSharp/blob/master/native-builds/src/SkManagedStream.cpp
from skiasharp.
I see we were thinking about this from two different viewpoints.
Your viewpoint wraps a C# stream into something that can be surfaced to the Skia world, this is very useful.
My request is to make SKStream subclass Stream so that existing APIs in C# that consume streams can be used with SKStreams. This means that we could use SKStreams everywhere where we expect an instance of Stream. But perhaps there is no much use for it, and perhaps we could just live with a "proxy", like SKStream.AsStream() that returns a Stream that can be used to access the underlying stream if needed.
Flagging this as low-priority, until we have better use case.
from skiasharp.
I am closing this as this will involve changing a few base types. Also, I don't think it will be possible as we need to preserve the skia type hierarchy. All is not lost, as there are extension methods and wrappers that can be used with the native streams, without a performance hit.
from skiasharp.
Related Issues (20)
- [CRASH] System.NullReferenceException when Invalidating an SKGLView after porting Xamarin.Forms app to MAUI HOT 4
- [BUG] SKCanvasView's PaintSurface is being called even when hidden from view upon invalidating surface of another SKCanvasView HOT 4
- [BUG] On iOS only, .NET 9.0 / SkiaSharp 3.0 SKCanvasView inside a custom control does not draw itself upon first appearance of the first page HOT 1
- [BUG] XAML Live Preview for Android shows most SKCanvasViews distorted (Visual Studio 2022 17.10 Preview 2 / .NET 9.0 Preview 2)
- [FEATURE] Support Direct3D HOT 4
- [BUG] `SKNativeObject` instances are not kept alive during native API calls
- [BUG] Annoying warning on .NET Framework 4.8 project with SkiaSharp 2.88.6 or 2.88.7 HOT 17
- [BUG] Text Missing When Running From AWS Lambda HOT 2
- [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
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.