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; |