diff options
author | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-06 00:03:20 +0000 |
---|---|---|
committer | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-06 00:03:20 +0000 |
commit | 8d9080abab79f5223c55ffef492213ff2e23abca (patch) | |
tree | 7ea9cc1ada42ca1f4462620a2725b2dd4c3b55e9 /content | |
parent | c97fb87e1853d025e062fd00cc59ef814b7d8cd7 (diff) | |
download | chromium_src-8d9080abab79f5223c55ffef492213ff2e23abca.zip chromium_src-8d9080abab79f5223c55ffef492213ff2e23abca.tar.gz chromium_src-8d9080abab79f5223c55ffef492213ff2e23abca.tar.bz2 |
Fix large mis-paint when resizing windows aura chrome
See bug attached for screenshots
The CL does two things:
- Disables the resizer lock, so that UI bits can go ahead of content bits
- Janks (blocks) the UI thread until the compositor has flushed / finished
the pending commands.
This makes the mis-draw way less, up to one frame behind, which at my regular
mouse speed of 1.2 pixels / ms comes out to 20 pixels of whiteout.
BUG=177115
TEST=none
Review URL: https://codereview.chromium.org/13604007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192657 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/renderer_host/render_widget_host_view_aura.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index 443eee9..adc258a 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -771,6 +771,14 @@ void RenderWidgetHostViewAura::SetBounds(const gfx::Rect& rect) { if (!compositor->HasObserver(this)) compositor->AddObserver(this); +// On Windows while resizing, the the resize locks makes us mis-paint a white +// vertical strip (including the non-client area) if the content composition is +// lagging the UI composition. So here we disable the throttling so that the UI +// bits can draw ahead of the content thereby reducing the amount of whiteout. +// Because this causes the content to be drawn at wrong sizes while resizing +// we compensate by blocking the UI thread in Compositor::Draw() by issuing a +// FinishAllRendering() if we are resizing. +#if !defined (OS_WIN) bool defer_compositor_lock = can_lock_compositor_ == NO_PENDING_RENDERER_FRAME || can_lock_compositor_ == NO_PENDING_COMMIT; @@ -780,6 +788,7 @@ void RenderWidgetHostViewAura::SetBounds(const gfx::Rect& rect) { resize_locks_.push_back(make_linked_ptr( new ResizeLock(root_window, rect.size(), defer_compositor_lock))); +#endif } } window_->SetBounds(rect); |