Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use hardware-accelerated SKGLView #1645

Closed
Kay-STL opened this issue Oct 14, 2024 · 2 comments
Closed

Use hardware-accelerated SKGLView #1645

Kay-STL opened this issue Oct 14, 2024 · 2 comments

Comments

@Kay-STL
Copy link
Contributor

Kay-STL commented Oct 14, 2024

Is your feature request related to a problem? Please describe.
In real-time charts that require high performance, using SKGLView rather than SKCanvasView results in much better frametimes. SKCanvasView is inherently software-rendered, whereas SKGLView is hardware-accelerated.

Describe the solution you'd like
Not 100% sure yet, mainly just want to ask a few questions first - namely, whether entirely switching to SKGLView would be feasible or not due to e.g. view incompatibility or other issues, or whether it'd be better to just document the option of using it with a ControlTemplate.

Describe alternatives you've considered
N/A

Additional context
I've tested switching to SKGLView in LiveChartsCore.SkiaSharpView.Maui on Android w/ SkiaSharp 3, and the frametime bump is pretty significant - a real-time chart that previously struggled to maintain 30fps is now much closer to 60fps.

@beto-rodriguez
Copy link
Owner

See https://github.com/beto-rodriguez/LiveCharts2/tree/hardware-accelerated

that branch works, but in my test, I get more frames on the SKCanvas than SKGLView, at least on windows, not completely sure why.

@Kay-STL
Copy link
Contributor Author

Kay-STL commented Oct 27, 2024

that branch works, but in my test, I get more frames on the SKCanvas than SKGLView, at least on windows, not completely sure why.

Huh, interesting - I've never had any issues with the Canvas view on Windows or iOS for what its worth, it's usually decently fast there, it's primarily Android where switching to the GL view makes a huge difference. I'm guessing the underlying SKXamlCanvas on Windows is probably fairly quick already.

Kay-STL added a commit to Swallowing-Technology/LiveCharts2 that referenced this issue Nov 1, 2024
beto-rodriguez added a commit that referenced this issue Nov 5, 2024
feat: add global toggle for GPU rendering. closes #1645
@Kay-STL Kay-STL closed this as completed Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants