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

Unified Diff: ui/compositor/compositor.cc

Issue 13604007: Fix large mis-paint when resizing windows aura chrome (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 8 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
« no previous file with comments | « ui/compositor/compositor.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositor.cc
===================================================================
--- ui/compositor/compositor.cc (revision 192628)
+++ ui/compositor/compositor.cc (working copy)
@@ -410,6 +410,7 @@
device_scale_factor_(0.0f),
last_started_frame_(0),
last_ended_frame_(0),
+ next_draw_is_resize_(false),
disable_schedule_composite_(false),
compositor_lock_(NULL) {
root_web_layer_ = cc::Layer::Create();
@@ -527,6 +528,18 @@
// compositeImmediately() directly.
Layout();
host_->Composite(base::TimeTicks::Now());
+
+#if defined(OS_WIN)
+ // While we resize, we are usually a few frames behind. By blocking
+ // the UI thread here we minize the area that is mis-painted, specially
+ // in the non-client area. See RenderWidgetHostViewAura::SetBounds for
+ // more details and bug 177115.
+ if (next_draw_is_resize_ && (last_ended_frame_ > 1)) {
+ next_draw_is_resize_ = false;
+ host_->FinishAllRendering();
+ }
+#endif
+
}
if (!pending_swap.posted())
NotifyEnd();
@@ -557,6 +570,8 @@
size_ = size_in_pixel;
host_->SetViewportSize(size_in_pixel, size_in_pixel);
root_web_layer_->SetBounds(size_in_pixel);
+
+ next_draw_is_resize_ = true;
}
if (device_scale_factor_ != scale) {
device_scale_factor_ = scale;
« no previous file with comments | « ui/compositor/compositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698