本文介绍了使用WebBrowser控件时IE 11 WebGL性能变慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将Cesium嵌入到WinForms或WPF应用程序内的WebBrowser控件中(使用IE 11)。作为测试我正在使用此链接:

I'm trying to embed Cesium in a WebBrowser control inside of a WinForms or WPF application (using IE 11). As a test I'm using this link:

它有效但比直接使用IE 11要慢得多。在IE 11中,一切都以60fps运行;在具有WebBrowser控件的简单WPF或WinForms应用程序中,它以4-6 fps运行。我一直无法追查问题的原因。这是一个空白的窗体或WPF面板,其中WebBrowser控件设置为填充整个窗格。我无法想象没有透明度或其他问题。我注意到,在Visual Studio嵌入式浏览器中访问上述链接具有相同的效果。 WebBrowser是否控制不是JIT JavaScript?这是一个WebGL问题吗?有没有办法我可以调试这个来弄清楚发生了什么?任何帮助将不胜感激。

It "works" but is much much slower than using IE 11 directly. In IE 11, everything runs at 60fps; in a simple WPF or WinForms app with the WebBrowser control it runs at 4-6 fps. I've been unable to track down the cause of the problem. This is with a blank Form or WPF Panel with the WebBrowser control set to fill the entire pane. There's no transparency or other issues that I can imagine. I've noticed that going to the above link inside of the Visual Studio embedded browser has the same effect. Does WebBrowser control not JIT JavaScript? Is it a WebGL issue? Is there a way I can debug this to figure out what's going on? Any help would be greatly appreciated.

推荐答案

看看这个:

通过设置以下:


  • FEATURE_BROWSER_EMULATION - 设置为IE
    渲染引擎的期望版本

  • FEATURE_GPU_RENDERING - 设置为1,以使GPU
    渲染。

这些密钥可以在HKEY_LOCAL_MACHINE或
HKEY_CURRENT_USER下设置为特定程序(可执行文件名),它使用
嵌入式浏览器。 HKCU是首选,因为该程序不需要
管理员权限写入HKCU。

These keys can be set under HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER for a specific program (executable name), which uses the embedded browser. HKCU is preferred since the program won’t need administrator privileges to write to HKCU.

所以当我将FEATURE_BROWSER_EMULATION设置为10000(对于IE10)并设置$时b $ b FEATURE_GPU_RENDERING为1,性能提升至~850美元@
60 fps。还不如1000+ fishies的独立IE好,但
相当不错!

So when I set FEATURE_BROWSER_EMULATION to 10000 (for IE10) and set FEATURE_GPU_RENDERING to 1, the performance improved to ~850 fishies @ 60 fps. Still not as good as standalone IE with its 1000+ fishies, but quite an improvement!

这篇关于使用WebBrowser控件时IE 11 WebGL性能变慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 09:01