When using SkCanvasView inside Blazor in Maui, does every canvas action require interop? #3182
Unanswered
ToolmakerSteve
asked this question in
Q&A
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Using SkiaSharp.Views.Blazor.SKCanvasView, as a Razor component inside the BlazorWebView of a Maui Blazor Hybrid app, how exactly do C# canvas operations (e.g.
canvas.DrawCircle
) render to the Skia canvas?My understanding is:
Is that correct so far?
If so, that sounds like
canvas.DrawCircle
would require an interop each frame.A lot of those would thus be a performance issue?
For performance, do we need to rewrite our code to put as much as possible into an
SKPictureRecorder
?(So that we can render it with a single canvas operation.)
If we change from SKCanvasView to SKGLView, will that be roughly the same, in terms of how code should be rewritten for the sake of performance? Are there any additional considerations when using GL?
Beta Was this translation helpful? Give feedback.
All reactions