You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
area/skia ✏️Categorizes an issue or PR as relevant to Skiadifficulty/tbdCategorizes an issue for which the difficulty level needs to be defined.kind/enhancementNew feature or requestproject/core-tools 🛠️Categorizes an issue or PR as relevant to core and tools
The SKXamlCanvas have to copy the pixel data to WriteableBitmap :
publicpartialclassSKXamlCanvas:Canvas{privatevoidDoInvalidate(){...var info =CreateBitmap(outvarunscaledSize,outvardpi);using(varsurface=SKSurface.Create(info,pixelsHandle.AddrOfPinnedObject(),info.RowBytes)){...OnPaintSurface(...);}// This implementation is not fast enough, and providing the original pixel buffer// is needed, yet the internal `IBufferByteAccess` interface is not yet available in Uno.// Once it is, we can replace this implementation and provide the pinned array directly// to skia.using(vardata=bitmap.PixelBuffer.AsStream()){data.Write(pixels,0,pixels.Length);data.Flush();}bitmap.Invalidate();}}
Thanks for the update. The hack you're suggesting is about exposing an API that is not meant to be exposed in the first place. We need a SkiaVisual in order for Uno.WinUI to expose an API that SkiaSharp and any other animplementation can use reliably.
@agneszitte@jeromelaban Not yet. The work is pretty much done but I removed it from #16621 because the PR was getting too big and we wanted to merge the GLCanvasElement work. I will open another PR for SKCanvasElement soon.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or feature requests.
area/skia ✏️Categorizes an issue or PR as relevant to Skiadifficulty/tbdCategorizes an issue for which the difficulty level needs to be defined.kind/enhancementNew feature or requestproject/core-tools 🛠️Categorizes an issue or PR as relevant to core and tools
Activity
lindexi commentedon Jan 23, 2024
Awesome, thank you @jeromelaban . I'm looking forward to this feature
Why not SKXamlCanvas?
Because the SKXamlCanvas is working the hack thing. The SKXamlCanvas will render and then copy to WriteableBitmap to show.
See https://github.com/mono/SkiaSharp/blob/9274aeec807fd17eec2a3266ad4c2475c37d8a0c/source/SkiaSharp.Views.Uno/SkiaSharp.Views.Uno.WinUI.Skia/SKXamlCanvas.Skia.cs#L27
The SKXamlCanvas have to copy the pixel data to WriteableBitmap :
See #15097 (reply in thread)
Before the SkiaVisual added, we can use the hack code to implemente the same functionality. The demo code: https://github.com/lindexi/lindexi_gd/tree/5db72c3d67f121becefb5c4e8a0eacd5099c4198/KefalurcilaybelJallbuderenajel
See #15097 (reply in thread)
jeromelaban commentedon Jan 23, 2024
Thanks for the update. The hack you're suggesting is about exposing an API that is not meant to be exposed in the first place. We need a
SkiaVisualin order for Uno.WinUI to expose an API that SkiaSharp and any other animplementation can use reliably.Adding the hight performance skia
lindexi commentedon Sep 6, 2024
Good job!
agneszitte commentedon Sep 6, 2024
@jeromelaban, @rafael-rosa-knowcode should @jhanvi03 or @Darsh0307 test the uno samples app for this new support?
jeromelaban commentedon Sep 6, 2024
@agneszitte yes, the uno samples app contains a new sample for WPF and X11.
ramezgerges commentedon Sep 6, 2024
@agneszitte @jeromelaban Not yet. The work is pretty much done but I removed it from #16621 because the PR was getting too big and we wanted to merge the GLCanvasElement work. I will open another PR for SKCanvasElement soon.
agneszitte commentedon Sep 6, 2024
Thanks for the info @ramezgerges, let them know when it will be ready for QA when it will be done please
github-actions commentedon May 8, 2026
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or feature requests.