Chromium Code Reviews| Index: ui/compositor/compositor.cc |
| =================================================================== |
| --- ui/compositor/compositor.cc (revision 192187) |
| +++ ui/compositor/compositor.cc (working copy) |
| @@ -411,6 +411,7 @@ |
| last_started_frame_(0), |
| last_ended_frame_(0), |
| disable_schedule_composite_(false), |
| + is_resizing_ (false), |
|
piman
2013/04/04 21:56:14
nit: would next_draw_is_resize_ be a better name?
cpu_(ooo_6.6-7.5)
2013/04/05 17:05:51
If you really want it, sure, the current name desc
piman
2013/04/05 17:15:32
well, imo, "is_resizing_" suggests that it's a sta
|
| compositor_lock_(NULL) { |
| root_web_layer_ = cc::Layer::Create(); |
| root_web_layer_->SetAnchorPoint(gfx::PointF(0.f, 0.f)); |
| @@ -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 (is_resizing_ && (last_ended_frame_ > 1)) { |
|
piman
2013/04/04 21:56:14
nit: >1 or >0?
We only want to not wait on the fir
cpu_(ooo_6.6-7.5)
2013/04/05 17:05:51
I see two passing by, one is pure white and the se
|
| + is_resizing_ = 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); |
| + |
| + is_resizing_ = true; |
| } |
| if (device_scale_factor_ != scale) { |
| device_scale_factor_ = scale; |