diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-05 18:14:57 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-05 18:14:57 +0000 |
commit | ec2a5fcd5f4dd9c574d174132ef5c8611b56e8bf (patch) | |
tree | 1d813a821bf01614b1e889ba9f473bebfd0fd0cf /webkit/glue/chrome_client_impl.cc | |
parent | a6021be60e931b146c7694c168ae6e13304ee7dc (diff) | |
download | chromium_src-ec2a5fcd5f4dd9c574d174132ef5c8611b56e8bf.zip chromium_src-ec2a5fcd5f4dd9c574d174132ef5c8611b56e8bf.tar.gz chromium_src-ec2a5fcd5f4dd9c574d174132ef5c8611b56e8bf.tar.bz2 |
Fix slow scrolling by ignoring spurious paint requests (i.e., paint requests
where content_changed is false). These calls to repaint are safe to ignore
given our painting architecture.
BUG=4108
R=brettw
Review URL: http://codereview.chromium.org/9174
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4787 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/chrome_client_impl.cc')
-rw-r--r-- | webkit/glue/chrome_client_impl.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/webkit/glue/chrome_client_impl.cc b/webkit/glue/chrome_client_impl.cc index b0eaf95..618869d 100644 --- a/webkit/glue/chrome_client_impl.cc +++ b/webkit/glue/chrome_client_impl.cc @@ -361,6 +361,9 @@ WebCore::IntRect ChromeClientImpl::windowResizerRect() const { void ChromeClientImpl::repaint( const WebCore::IntRect& paint_rect, bool content_changed, bool immediate, bool repaint_content_only) { + // Ignore spurious calls. + if (!content_changed || paint_rect.isEmpty()) + return; WebViewDelegate* d = webview_->delegate(); if (d) d->DidInvalidateRect(webview_, webkit_glue::FromIntRect(paint_rect)); |