beto-rodriguez / LiveCharts2

Simple, flexible, interactive & powerful charts, maps and gauges for .Net, LiveCharts2 can now practically run everywhere Maui, Uno Platform, Blazor-wasm, WPF, WinForms, Xamarin, Avalonia, WinUI, UWP.
https://livecharts.dev
MIT License
4.39k stars 573 forks source link

feat: add global toggle for GPU rendering. closes #1645 #1685

Closed Kay-STL closed 2 weeks ago

Kay-STL commented 3 weeks ago

This PR adds a global toggle to enable/disable GPU rendering, i.e. switching from SKCanvasView to SKGLView. This is primarily useful on Android where canvas rendering can be slow. Closes #1645.

In draft as this is currently just a prototype for the MAUI view, needs to be extended out to the others, but I figured I'd send this to get some feedback. Figured it would be easier to branch off dev for this rather than continuing from hardware-accelerated, but happy to move these changes over to there if that's better.

Kay-STL commented 3 weeks ago

I've added support for WPF and Xamarin, and I've hooked the existing Blazor support to the new setting. WinForms has a GL control as well, but unfortunately anything WinForms-related is completely bricked on my machine at the moment... I don't think any of the other views have GL support available.

beto-rodriguez commented 2 weeks ago

Figured it would be easier to branch off dev for this rather than continuing from hardware-accelerated, but happy to move these changes over to there if that's better.

I agree, this is now ready to go into dev.

beto-rodriguez commented 2 weeks ago

I merged this for now, but I'll add a couple of improvements on #1692

Thanks for the PR!

Kay-STL commented 2 weeks ago

Sounds good :) Thanks for the merge!