diff options
-rw-r--r-- | content/browser/renderer_host/render_widget_host_view_aura.cc | 7 | ||||
-rw-r--r-- | content/browser/renderer_host/render_widget_host_view_aura.h | 2 |
2 files changed, 7 insertions, 2 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 ea4ab8d..b53a55c 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -84,7 +84,8 @@ RenderWidgetHostViewAura::RenderWidgetHostViewAura(RenderWidgetHost* host) ALLOW_THIS_IN_INITIALIZER_LIST(window_(new aura::Window(this))), is_fullscreen_(false), popup_parent_host_view_(NULL), - is_loading_(false) { + is_loading_(false), + skip_schedule_paint_(false) { host_->SetView(this); window_->SetProperty(aura::kTooltipTextKey, &tooltip_); } @@ -226,7 +227,7 @@ void RenderWidgetHostViewAura::ImeCancelComposition() { void RenderWidgetHostViewAura::DidUpdateBackingStore( const gfx::Rect& scroll_rect, int scroll_dx, int scroll_dy, const std::vector<gfx::Rect>& copy_rects) { - if (!window_->IsVisible()) + if (!window_->IsVisible() || skip_schedule_paint_) return; if (!scroll_rect.IsEmpty()) @@ -473,7 +474,9 @@ void RenderWidgetHostViewAura::OnCaptureLost() { void RenderWidgetHostViewAura::OnPaint(gfx::Canvas* canvas) { if (!window_->IsVisible()) return; + skip_schedule_paint_ = true; BackingStore* backing_store = host_->GetBackingStore(true); + skip_schedule_paint_ = false; if (backing_store) { static_cast<BackingStoreSkia*>(backing_store)->SkiaShowRect(gfx::Point(), canvas); diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h index 5f7d9ce..b5da8ad 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.h +++ b/content/browser/renderer_host/render_widget_host_view_aura.h @@ -161,6 +161,8 @@ class RenderWidgetHostViewAura : public RenderWidgetHostView, accelerated_surface_containers_; #endif + bool skip_schedule_paint_; + DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); }; |