Description
Description
I'm drawing several SKBitmap
s on a SKGLView
on macOS, I'm using SKFilterQuality.High
to get the best quality of the images. If the canvas is zoomed in and only one image is visible the performance is okay, but once I zoom out and multiple SKBitmap
s are visible performance and rendering speed drops. Some of the images are quite big (i.e. 4000*300px) - so I wanted to check if the performance drop is caused by my code or if Skia(Sharp)s performance is limited in this case (even on the GPU)
Code
This is my PaintSurface
method - repro link contains my full source
void CanvasView_PaintSurface(object sender, SkiaSharp.Views.Mac.SKPaintGLSurfaceEventArgs e)
{
e.Surface.Canvas.Clear(SKColors.Black);
e.Surface.Canvas.SetMatrix(_m);
for(int i = 0; i < imgs.Count; i++)
{
e.Surface.Canvas.DrawBitmap(imgs.ElementAt(i), rects.ElementAt(i), HighQualityImagePaint);
}
}
Expected Behavior
Since drawing is happening on the GPU (SKGLView) i expect smooth rendering and good performance.
Actual Behavior
Framerate drops and panning / zooming feels really slow
Basic Information
- Version with issue: 1.60.3
- IDE: <!-- Visual Studio for Mac 7.7.2 (Build 21)
- Platform Target Frameworks: Xamarin.Mac
- macOS: 10.14.2 (18C54)
- Target Devices: Macbook Pro 13" (2018 Touchbar)
Screenshots
Reproduction Link
https://github.com/nor0x/SkiaSharp_PerfomanceExperiments
VS bug #770230
Metadata
Metadata
Assignees
Type
Projects
Status