-
Notifications
You must be signed in to change notification settings - Fork 547
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
WPF Desktop Performance #622
Comments
Looking at the code here:
I'm pretty sure that this would be improved by fixing #552 |
You can wrap Windows Forms SKGLControl up inside a WPF Element like it is done in the skia WPF sample: |
I've spent several days poking around, building SkiaSharp, Angle, etc. The WPF SKElement is not GPU-accelerated. Getting ANGLE added in as a GLES context is non-trivial. I haven't succeeded yet. For us, embedding a Winforms control is not acceptable, due to the airspace and other issues. (As an aside, it looks like Skia is built against OpenTK 1.1, which is all well and good, other than breaking changes in OpenTK between 1 and 2 and the current 3.) For now, we are going to live with the CPU-intensive software rendering, GPU offload could be nice, but we can't spend weeks or months on this one part of the application. Unfortunately, there does not seem to be any full-featured hardware-accelerated 2D option for WPF anywhere, as the problem has been asked about on various boards in various ways for about 10 years. |
@ibgorton Up to you of course, but why SKGLControl is not acceptable? |
Ooh, thank you! Taking a look now. |
Description
We are developing a WPF Desktop product, using the SKElement to render to screen. When drawing a SKPath with a large number of lines (1000 in our test), framerate drops significantly as CPU usage on our UI thread maxes out. Our use case could have need to display hundreds or even thousands of graphical elements.
Is the SKElement control GPU-accelerated?
If not, would it be worth our bother creating our own that creates a GL GRContext? To do this will require compiling our own ANGLE dll, as the nuget packages only target Windows Store, which isn't compatible with a WPF Desktop project.
Basic Information
Reproduction Link
We created a demo solution demonstrating our issue:
https://github.com/ibgorton/skia_wpf_slow
The text was updated successfully, but these errors were encountered: