使用WebBrowser控件时IE 11 WebGL性能变慢 [英] IE 11 WebGL performance slow when using WebBrowser control

查看:791
本文介绍了使用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:

http://cesiumjs.org/Cesium/Build/Apps/CesiumViewer/index.html?stats=true

它有效但比直接使用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.

推荐答案

看看这个文章


事实证明,嵌入式浏览器默认使用IE7渲染引擎
,即使安装了较新版本的IE也是如此。此外,GPU
渲染已关闭,因此浏览器仅使用软件渲染

As it turns out, the embedded browser uses the IE7 rendering engine by default, even if a newer version of IE is installed. Also, GPU rendering is switched off, so the browser uses software rendering only.

通过设置以下特征控制注册表键


  • 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性能变慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆