Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5959)

Unified Diff: chrome/browser/render_widget_host.cc

Issue 18082: Improve scrolling performance when there are many windowed plugins in a page.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Call DestroyWindow on the right thread & ensure NPP_SetWindow is called right away Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/render_widget_host.cc
===================================================================
--- chrome/browser/render_widget_host.cc (revision 8043)
+++ chrome/browser/render_widget_host.cc (working copy)
@@ -434,6 +434,9 @@
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()));
@@ -443,7 +446,10 @@
}
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)

Powered by Google App Engine
This is Rietveld 408576698