diff --git compositing_iosurface_layer_mac.mm compositing_iosurface_layer_mac.mm index 81a3529..dfcc48d 100644 --- compositing_iosurface_layer_mac.mm +++ compositing_iosurface_layer_mac.mm @@ -268,7 +268,7 @@ void CompositingIOSurfaceLayerHelper::EndPumpingFrames() { TRACE_EVENT0("browser", "CompositingIOSurfaceLayer::drawInCGLContext"); if (!iosurface_->HasIOSurface() || context_->cgl_context() != glContext) { - glClearColor(1, 1, 1, 1); + glClearColor(0, 0, 0, 0); glClear(GL_COLOR_BUFFER_BIT); return; } diff --git compositing_iosurface_mac.mm compositing_iosurface_mac.mm index 7012399..47cb9d1 100644 --- compositing_iosurface_mac.mm +++ compositing_iosurface_mac.mm @@ -167,7 +167,7 @@ bool CompositingIOSurfaceMac::DrawIOSurface( CHECK_AND_SAVE_GL_ERROR(); } else { // Should match the clear color of RenderWidgetHostViewMac. - glClearColor(1.0f, 1.0f, 1.0f, 1.0f); + glClearColor(0, 0, 0, 0); glClear(GL_COLOR_BUFFER_BIT); } diff --git render_widget_host_view_aura.cc render_widget_host_view_aura.cc index 49ee8e4..c49ef82 100644 --- render_widget_host_view_aura.cc +++ render_widget_host_view_aura.cc @@ -1615,8 +1615,14 @@ void RenderWidgetHostViewAura::OnPaint(gfx::Canvas* canvas) { // For non-opaque windows, we don't draw anything, since we depend on the // canvas coming from the compositor to already be initialized as // transparent. - if (window_->layer()->fills_bounds_opaquely()) - canvas->DrawColor(SK_ColorWHITE); + if (window_->layer()->fills_bounds_opaquely()) { + if (host_->IsRenderView()) { + canvas->DrawColor(GetContentClient()->browser()->GetBaseBackgroundColor( + RenderViewHost::From(host_))); + } else { + canvas->DrawColor(SK_ColorWHITE); + } + } } void RenderWidgetHostViewAura::OnDeviceScaleFactorChanged( diff --git render_widget_host_view_mac.mm render_widget_host_view_mac.mm index 4ebbd62..7b3983a 100644 --- render_widget_host_view_mac.mm +++ render_widget_host_view_mac.mm @@ -507,7 +507,7 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget) // draw. background_layer_.reset([[CALayer alloc] init]); [background_layer_ - setBackgroundColor:CGColorGetConstantColor(kCGColorWhite)]; + setBackgroundColor:CGColorGetConstantColor(kCGColorClear)]; [cocoa_view_ setLayer:background_layer_]; [cocoa_view_ setWantsLayer:YES];