Windows: Fix white flash during browser creation (issue #1984)

This commit is contained in:
Marshall Greenblatt
2017-01-13 16:35:26 -05:00
parent 288d2eb2e6
commit ff7f70442f
3 changed files with 24 additions and 2 deletions

View File

@ -0,0 +1,17 @@
diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc
index 8a73ab8..11f2d54 100644
--- content/browser/renderer_host/render_widget_host_view_aura.cc
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -761,8 +761,10 @@ void RenderWidgetHostViewAura::SetBackgroundColor(SkColor color) {
RenderWidgetHostViewBase::SetBackgroundColor(color);
bool opaque = GetBackgroundOpaque();
host_->SetBackgroundOpaque(opaque);
- window_->layer()->SetFillsBoundsOpaquely(opaque);
- window_->layer()->SetColor(color);
+ if (window_) {
+ window_->layer()->SetFillsBoundsOpaquely(opaque);
+ window_->layer()->SetColor(color);
+ }
}
bool RenderWidgetHostViewAura::IsMouseLocked() {