SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.
MIT License
4.52k
stars
540
forks
source link
[BUG] On iOS SKSurface.Snapshot returns null when called from SKGLView #1600
Snapshot() method of SKSurface always returns null on iOS devices (both physical and virtual) when it's called inside SKGLView, but it seems to work when it is used from SKCanvasView. Actually it looks exactly like an old issue which was fixed in 1.6, but it works fine on Android devices this time. (https://github.com/mono/SkiaSharp/issues/436).
protected override void OnPaintSurface(SKPaintGLSurfaceEventArgs e)
{
var snapshot = e.Surface.Snapshot();
if(snapshot == null)
{
//code on iOS enters here
}
}
Snapshot() method of SKSurface always returns null on iOS devices (both physical and virtual) when it's called inside SKGLView, but it seems to work when it is used from SKCanvasView. Actually it looks exactly like an old issue which was fixed in 1.6, but it works fine on Android devices this time. (https://github.com/mono/SkiaSharp/issues/436).
Expected Behavior
Returns valid SKImage
Actual Behavior
Returns null
Basic Information