-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
WPF - Rendering not refreshed at maximum framerate. #2275
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
Comments
This may not be due to CefSharp as it is just a wrapper around CEF. If you re-read the new issue template you should see a section on running the CEF sample application ( Did you search old issues to see if this issue has been reported previously, and if so what did you find? |
It's my understanding that command line option is only implemented in the |
I ran the cefclient sample with the command I can't reproduce the issue with Cef alone because it is linked to WPF. When the Wpf application is drawing something, the browser rendering is refreshed at full speed. I tried I display something under the mouse cursor using a DrawingVisual and just passing the mouse over the application without clicking or without being above the browser is enough to have the browser render speedup. |
Do you think it's a problem with CefSharp? To me it sounds more of a problem with WPF. |
The rendering used for WPF has been rewritine, so you should have a much easier time debugging |
Maybe Changing the dispatcher priority in I will download the CefSharp source and try this. |
If that is the case then the priority should be made configurable. |
I changed the priority of all the Dispatcher call I found in the WPF solution but nothing changed. It seem to be a bug from WPF. The |
What version of .net do you have installed? You can try the different bitmap implementations, see if one is better. Have you tested on a different machine to verify it's not just a GPU driver issue? |
Can you provide a code sample of an animation you are using that forces the browser to render at a different speed? |
I just do
the animated rectangle can be placed anywhere in the application. I tried it on different machine with NVidia GPU (geforce GTX 960 and geforce GT 750M ) |
This comment was marked as outdated.
This comment was marked as outdated.
dotnet/wpf#1908 describes a similar behaviour in WPF. |
Adding an animation appears to workaround the issue.
Using Assign a new instance to http://cefsharp.github.io/api/79.1.x/html/P_CefSharp_Wpf_ChromiumWebBrowser_RenderHandler.htm browser.RenderHandler = new CompositionTargetRenderHandler(browser, browser.DpiScaleFactor, browser.DpiScaleFactor); |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@valhentai mentioned this solution and and said it didn't work
It worked for me! Now getting 60 fps from my webgl2 web application.
|
I noticed a strange behavior in the WPF CefSharp browser. When watching a video (YouTube for example), the video is not totaly fluid. but if something else is hapenning in the application, like an animation, the video is completly fluid.
My theory is that the animation cause WPF do redraw at 60 FPS and it cause the CefSharp browser to redraw at this rate. When no animation is running, the default CefSharp redraw rate is smalller.
I tried differents values for the
CefCommandLineArgs --off-screen-frame-rate
( 25, 30 , 60, 120 ) but the result is the same.I am using The WPF nuget version 63.0.0 on WIndows 10.
I use the following command line
with gpu disabled, the result is the same.
The text was updated successfully, but these errors were encountered: