diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-16 23:04:23 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-16 23:04:23 +0000 |
commit | d7f4595986302dcf131b943152a843d067e53c1e (patch) | |
tree | 7165e6c839aaae33587dab4dbc28df862d1c8428 /chrome/browser/render_widget_host.cc | |
parent | efb07436b9ba4737247cdf0e8ba0529e27942468 (diff) | |
download | chromium_src-d7f4595986302dcf131b943152a843d067e53c1e.zip chromium_src-d7f4595986302dcf131b943152a843d067e53c1e.tar.gz chromium_src-d7f4595986302dcf131b943152a843d067e53c1e.tar.bz2 |
Improve scrolling performance when there are many windowed plugins in a page.
This works by parenting windowed plugins with an HWND that's hosted in the browser process, so that no synchronous cross process messages are used when scrolling.
BUG=5428
Review URL: http://codereview.chromium.org/18082
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8239 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/render_widget_host.cc')
-rw-r--r-- | chrome/browser/render_widget_host.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/render_widget_host.cc b/chrome/browser/render_widget_host.cc index 2823cba..9ce5f0a 100644 --- a/chrome/browser/render_widget_host.cc +++ b/chrome/browser/render_widget_host.cc @@ -436,6 +436,9 @@ void RenderWidgetHost::OnMsgScrollRect( void RenderWidgetHost::MovePluginWindows( const std::vector<WebPluginGeometry>& plugin_window_moves) { + if (plugin_window_moves.empty()) + return; + HDWP defer_window_pos_info = ::BeginDeferWindowPos(static_cast<int>(plugin_window_moves.size())); @@ -445,7 +448,10 @@ void RenderWidgetHost::MovePluginWindows( } for (size_t i = 0; i < plugin_window_moves.size(); ++i) { - unsigned long flags = 0; + // Don't invalidate now because that would result in cross process calls + // that make scrolling slow. Instead the window is invalidated + // asynchronously by the plugin code. + unsigned long flags = SWP_NOREDRAW; const WebPluginGeometry& move = plugin_window_moves[i]; if (move.visible) |